Project:Python/PYTHON COMPAT

From Gentoo Wiki
Jump to:navigation Jump to:search

PYTHON_COMPAT is the variable that is used in python-r1 eclasses to list the Python implementations supported by the ebuild. It is a bash array.

Policies for ebuild maintainers

Adding implementations to PYTHON_COMPAT

Warning
Adding new implementations is much easier than removing them afterwards. Therefore, please make sure that an implementation works before adding it.

For adding implementations, similar rules as for adding KEYWORDS apply.

If you'd like to add a new implementation to PYTHON_COMPAT, you need to make sure that the package works properly with it. The exact routine depends on the package and is best known by the package maintainer. It often involves running a test suite, testing installed scripts or reverse dependencies.

Please also make sure that the implementation wasn't left out intentionally. Make sure that the ebuild doesn't contain any comments stating that it doesn't work, and check the bug tracker(s) for bugs.

Preferably, all package's dependencies need to support the added implementation. If necessary, the implementation should be enabled on dependencies as well.


Removing implementations from PYTHON_COMPAT

The python-r1 and python-single-r1 packages export their supported implementations via USE flags. Other packages use those USE flags to enforce matching implementations for properly satisfied dependencies.

For this reason, make sure that no reverse dependencies become broken by the removal. In most cases, it is enough to run a pkgcheck scan on the repository or use the reverse dependency listings.