Project:Python/PYTHON TARGETS

PYTHON_TARGETS and PYTHON_SINGLE_TARGET are USE_EXPAND variables controlling support for various Python implementations (versions) in packages. These essentially control what version of Python the package will reference during and after installation.

Enabling Python implementations

The modern packages (using -r1 suite eclasses) use explicit USE flags aggregated in PYTHON_TARGETS and PYTHON_SINGLE_TARGETUSE_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.

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. Due to technical limitations, the implementation specified as PYTHON_SINGLE_TARGET must also be included in PYTHON_TARGETS for the package in question.

The possible values are listed in the PYTHON_COMPAT column of the Python project's implementations list.

FILE/etc/portage/package.useExamples of PYTHON_TARGETS/PYTHON_SINGLE_TARGET