Project:Python/distutils-r1

The distutils-r1 eclass is the modern eclass aimed at packages using distutils, setuptools or a compatible build system.

PYTHON_COMPAT
Obligatory. Must be set above the inherit line.

A list of all Python implementations supported by ebuild. This variable is described more thoroughly in PYTHON_COMPAT article.

Example PYTHON_COMPAT

PYTHON_REQ_USE
Optional, defaults to none. Must be set above the inherit line.

USE-dependency that will be applied to all Python interpreters pulled in as dependencies. Takes the form of EAPI 4 USE dependency string, must apply cleanly to all supported Python implementations. See Python/Implementation USE flags for reference.

Example for PYTHON_REQ_USE

DISTUTILS_SINGLE_IMPL
Boolean. Enabled if non-empty, defaults to disabled. Must be set above the inherit line.

Enables the single implementation mode. If enabled, the eclass will use python-single-r1 backend. The package will be built with support for a single implementation only but it will be able to depend on libraries that do not support multiple implementations. Otherwise (the default), the eclass uses python-r1 backend and the package is built with support for multiple implementations of choice.

DISTUTILS_OPTIONAL
Boolean. Enabled if non-empty, defaults to disabled. Must be set above the inherit line.

Enables optional distutils mode. In this mode, no phase functions are exported, dependencies and REQUIRED_USE are not set by default. User is expected to define his own phase functions and call the eclass implementations properly, and to use PYTHON_DEPS and PYTHON_REQUIRED_USE.