The Python eclasses are eclasses maintained by the Gentoo Python team and aimed at helping writing ebuilds that install Python scripts, modules or simply require or use Python.
The currently supported suite of Python eclasses is called the python-r1 suite. It consists of the eclasses listed in the following table:
|distutils-r1||packages using distutils or setuptools (setup.py) build system|
|python-any-r1||packages which need Python interpreter during build-time (incl. tests)|
|python-single-r1||packages which install files that are used with one (and only one) of installed Python interpreters|
|python-r1||packages which install files that may be used with one or more of installed Python intepreters|
|python-utils-r1||common helper functions|
|twisted-r1||packages from the Twisted suite and Twisted plugins|
Choosing the correct eclass
In order to easily choose the correct eclass, you can use the following algorithm. You should stop on the first eclass that matches.
- If you install Twisted plugins, use twisted-r1.
- If your package uses distutils or setuptools (setup.py), use distutils-r1.
- If your package installs modules that need to work correctly with more than one of installed Python interpreters, use python-r1.
- If your package installs Python scripts or modules, links to libpython or needs to enforce one of specific versions of Python on its build-time dependencies, use python-single-r1.
- If your package uses Python interpreter at build-time and/or for tests, use python-any-r1.
These are the old eclasses that are no longer developed or supported. Their use is discouraged.
|distutils||packages using distutils or setuptools (setup.py) build system|
|python||any Python packages|
|twisted||packages from the Twisted suite and Twisted plugins|