Gentoo Archives: gentoo-dev

From: Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>
To: Gentoo Development <gentoo-dev@l.g.o>
Cc: qa@g.o
Subject: [gentoo-dev] Patch for python.eclass
Date: Mon, 18 Oct 2010 01:34:14
This patch for python.eclass is divided into 10 subpatches.

Subpatch #1 adds section header, renames a private function for consistency with other private
functions and adds unsetting of this private function after its using.

Subpatch #2 causes that dev-lang/python and sys-apps/portage don't use deprecated parts of
python_mod_optimize() and python_mod_cleanup(). This change can be safely made, because these
packages install .py files outside of site-packages directories.

Subpatch #3 adds some comments in python_mod_optimize() and python_mod_cleanup() to simplify
future work on python.eclass.

Subpatch #4 adds initial support for using of USE flags for representation of Python ABIs
in EAPI >=4. Appropriate USE flags will be automatically added to IUSE when SUPPORT_PYTHON_ABIS
variable has been set before inheriting python.eclass. python_add_abi_dependencies() function
will be used inside DEPEND/RDEPEND/PDEPEND to get appropriate dependency atoms.

Example usage:
      $(python_add_abi_dependencies ">=dev-python/PyQt4-4.7.7[svg]")
      $(python_add_abi_dependencies -e "2.7 3.[2-9]" dev-python/argparse)"
      $(python_add_abi_dependencies dev-python/setuptools)
      $(python_add_abi_dependencies -i "3.*" net-zope/zope-fixers)
      test? ( $(python_add_abi_dependencies dev-python/py) )"

argparse module is included in Python 2.7 and >=3.2, so dev-python/argparse is needed only with
older Python versions. net-zope/zope-fixers is needed only with Python 3.

Subpatch #5 improves some code used in older EAPIs.

Subpatch #6 bans python_mod_compile() function (in older EAPIs), which has been deprecated for
almost 5 months (since 2010-05-25). This function isn't used in the tree.

Subpatch #7 fixes a typo in python_mod_optimize().

Subpatch #8 bans NEED_PYTHON variable (in older EAPIs), which has been deprecated for over
3 months (since 2010-07-17). This variable isn't used in the tree.

Subpatch #9 disallows not passing of paths to Python modules to python_mod_optimize() and
python_mod_cleanup(). Not passing of paths to Python modules to these functions has been
deprecated for almost 5 months (since 2010-05-25). Paths to Python modules are passed to these
functions in all ebuilds in the tree. The change in python_mod_cleanup() results in some

Subpatch #10 fixes exporting of python_pkg_setup() in EAPI >=4.

There will be other changes in API of python.eclass in EAPI >=4, so python.eclass still doesn't
support EAPI="4".

I'm planning to commit this patch in 1 week.

Arfrever Frehtes Taifersar Arahesis


File name MIME type
python.eclass.patch text/x-patch
python.eclass.patch.1 text/x-patch
python.eclass.patch.2 text/x-patch
python.eclass.patch.3 text/x-patch
python.eclass.patch.4 text/x-patch
python.eclass.patch.5 text/x-patch
python.eclass.patch.6 text/x-patch
python.eclass.patch.7 text/x-patch
python.eclass.patch.8 text/x-patch
python.eclass.patch.9 text/x-patch
python.eclass.patch.10 text/x-patch
signature.asc application/pgp-signature


Subject Author
[gentoo-dev] Re: Patch for python.eclass Mike Frysinger <vapier@g.o>
Re: [gentoo-dev] Patch for python.eclass "Petteri R├Ąty" <betelgeuse@g.o>
Re: [gentoo-dev] Patch for python.eclass Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o>