Gentoo Python Multiple ABI Guide
Recent changes to the Python eclass have added the capability to Portage to
install and manage multiple simultaneous python installations. This functionality
can be especially useful to those requiring support for both Python-2 and Python-3,
and additionally support for multiple major versions of Python-2 and/or Python-3.
What this means is that the user can install any supported version of Python at the
same time and have Portage automatically build your packages for all installed
versions of Python assuming, of course, that the package itself supports it. Whats
more, this capability is all managed from the comfort of the well know file
For developers and interested users wishing to learn more about how this is
implemented please refer to the
Gentoo Python Developers Guide
Please be aware that this functionality is not dependent on your active python versions
as chosen by using eselect python.
The usage of this new capability is quite simple. Just fire up your favorite editor and
load /etc/make.conf. Shown below is an example of the usage of the new
Code Listing 2.1: Adding USE_PYTHON to /etc/make.conf
CFLAGS="-march=amdfam10 -O2 -pipe"
USE_PYTHON="2.5 2.6 2.7 3.0 3.1"
Once you have added USE_PYTHON to your /etc/make.conf
you must run python-updater.
Some packages are not yet ready to support multiple python ABIs, so your mileage may vary.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.