Difference between revisions of "Creating Python-related Ebuilds"
(→The old way: python-updater) |
|||
| Line 19: | Line 19: | ||
=== The old way: python-updater === | === The old way: python-updater === | ||
| − | With the current <tt>python.eclass</tt> in Gentoo and Funtoo Linux, python modules are built for all installed versions of python. However, no usable accounting information is stored by Portage so that it can "know" what versions of python the module was built for. This creates a problem when new versions of python are installed, as the new module will not be available for the new python, and Portage will not be aware of what needs to be done. This has resulted in the creation of a tool called <tt>python-updater</tt> to rebuild all necessary python-related ebuilds so that they reflect the currently-installed versions of python. | + | With the current <tt>python.eclass</tt> in Gentoo and Funtoo Linux, python modules are built for all installed versions of python. However, no usable accounting information is stored by Portage so that it can "know" what versions of python the module was built for. This creates a problem when new versions of python are installed, as the new module will not be available for the new python, and Portage will not be aware of what needs to be done to fix this, if anything. This has resulted in the creation of a tool called <tt>python-updater</tt> to rebuild all necessary python-related ebuilds so that they reflect the currently-installed versions of python. |
=== The new way: new python eclass === | === The new way: new python eclass === | ||
Revision as of 18:49, 28 January 2012
Progress Overlay currently contains 411 packages. After switching active version of Python, users should change value of PYTHON_ABIS in make.conf, run emerge with -N / --newuse option to reinstall packages with PYTHON_ABIS USE flags and next run python-updater to reinstall old-style packages.
- http://people.apache.org/~Arfrever/Gentoo_Python_Guide_for_Users
- http://people.apache.org/~Arfrever/Gentoo_Python_Supplementary_Guide_for_Developers
- http://people.apache.org/~Arfrever/EAPI_4-python_Specification
python-updater-0.10 doesn't reinstall any packages, which set PYTHON_MULTIPLE_ABIS and EAPI="4-python".
Contents |
Building Python Modules with Portage
Conceptual Overview
Portage supports the ability to build python modules and extensions for all installed versions of python. This functionality has been implemented by python.eclass.
To use python.eclass, you first want to investigate how python module building is integrated into any included Makefile or build script. Since we want python.eclass to build these modules for us, typically the first step is to tweak the Makefile or configure script to explicitly *not* build python modules. We will be handling that process using python.eclass.
Progress Improvements
The old way: python-updater
With the current python.eclass in Gentoo and Funtoo Linux, python modules are built for all installed versions of python. However, no usable accounting information is stored by Portage so that it can "know" what versions of python the module was built for. This creates a problem when new versions of python are installed, as the new module will not be available for the new python, and Portage will not be aware of what needs to be done to fix this, if anything. This has resulted in the creation of a tool called python-updater to rebuild all necessary python-related ebuilds so that they reflect the currently-installed versions of python.
The new way: new python eclass
The new python.eclass from Arfrever has a new API that can be used to write python ebuilds. When this API is used, Portage can track and resolve missing builds of python modules internally, so python-updater is not needed to be used for these ebuilds. However, until all ebuilds are converted to the new API, python-updater will need to be used to update these old-style ebuilds. For new-style python ebuilds, python-updater knows to perform a "NO-OP" and skip the ebuilds when updating the system.
Help us document this page so we can help others convert to the new python API from progress overlay :)