Project:Python/PYTHON TARGETS

PYTHON_TARGETS and PYTHON_SINGLE_TARGET are the USE_EXPAND variables controlling support for various Python implementations (versions) in packages.

Modern packages
The modern packages (using -r1 suite eclasses) use explicit USE flags aggregated in PYTHON_TARGETS and PYTHON_SINGLE_TARGET USE_EXPAND variables. The variables are defaulted in profiles and can be changed in make.conf. The flags may be adjusted per-package using package.use as well.

Default enabled implementations

The PYTHON_TARGETS variable is used for packages that support enabling more than a single Python implementation. Therefore, the variable may contain any number of implementations.

The PYTHON_SINGLE_TARGET variable is used for packages that are built for a single implementation of choice only. It may contain only a single implementation.

The possible values are listed in the PYTHON_COMPAT column of the implementations list.

python.eclass packages
The remaining packages (that can be identified by not having PYTHON_TARGETS USE flags) work in a different way.

If the user does not specify USE_PYTHON in make.conf (the default case), the packages are built for the versions of Python 2 and Python 3 which are installed and selected via eselect python.

Alternatively, the user may specify the requested implementations in USE_PYTHON. The possible values are listed in the USE_PYTHON column of the implementations list.

Unmasking non-stable implementation on a stable system
If you'd like to use an implementation that is not stable on your architecture on a stable system, you need to:


 * 1) Unmask the implementation using /etc/portage/package.accept_keywords,
 * 2) Unmask the relevant USE flags using /etc/portage/profile/use.stable.mask. This also requires to set /etc/portage/profile to EAPI >= 5.