Arfrever Frehtes Taifersar Arahesis 2010-02-05 17:40:00 napisaƂ(a): > The following changes should be made in ebuilds of packages supporting only Python 2: > - Dependency on Python 2 should be set correctly. You can specify it directly in > {,R}DEPEND or use PYTHON_DEPEND. > > Example: > PYTHON_DEPEND="2" > > inherit python > > - Miscellaneous actions should be executed with correct version of Python. > > - In ebuilds of packages supporting installation for multiple versions of Python, > please remember to disable installation for all versions of Python 3. > (Please do not use python_set_active_version() in ebuilds of these packages.) > > Example: > RESTRICT_PYTHON_ABIS="3.*" > > - In ebuilds of packages not supporting installation for multiple versions of Python, > set active version of Python using python_set_active_version(). > (Please avoid passing precisely specified Python ABI to python_set_active_version().) > > Example: > pkg_setup() { > python_set_active_version 2 > } > > (If given package currently cannot be installed for multiple versions of Python, > but it is theoretically possible (e.g. this package installs .py files into > /usr/lib/pythonX.Y/site-packages and does not install any non-versioned libraries > into /usr/lib), then please try to adjust ebuilds of this package to allow > installation for multiple versions of Python.) I forgot about 2 other types of changes: - Shebangs in installed scripts should be correct. If build system installs scripts with too generic shebangs (e.g. '#!/usr/bin/python'), then you can use python_convert_shebangs() to convert shebangs. Example: src_install() { ... python_convert_shebangs -r 2 "${D}usr/bin" } (Please note that wrapper scripts generated by python_generate_wrapper_scripts() work with all versions of Python from 2.4 to 3.2, so shebangs in these scripts do not need any changes.) - Some deprecated functions (python_version(), distutils_python_version()) and variables (${python}, ${PYVER} etc.) should not be used. Documentation [1] has been updated. I will start filing bugs maybe in this week. [1] http://www.gentoo.org/proj/en/Python/developersguide.xml -- Arfrever Frehtes Taifersar Arahesis