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
Message-Id: 201010180333.56025.Arfrever@gentoo.org
1 This patch for python.eclass is divided into 10 subpatches.
2
3 Subpatch #1 adds section header, renames a private function for consistency with other private
4 functions and adds unsetting of this private function after its using.
5
6 Subpatch #2 causes that dev-lang/python and sys-apps/portage don't use deprecated parts of
7 python_mod_optimize() and python_mod_cleanup(). This change can be safely made, because these
8 packages install .py files outside of site-packages directories.
9
10 Subpatch #3 adds some comments in python_mod_optimize() and python_mod_cleanup() to simplify
11 future work on python.eclass.
12
13 Subpatch #4 adds initial support for using of USE flags for representation of Python ABIs
14 in EAPI >=4. Appropriate USE flags will be automatically added to IUSE when SUPPORT_PYTHON_ABIS
15 variable has been set before inheriting python.eclass. python_add_abi_dependencies() function
16 will be used inside DEPEND/RDEPEND/PDEPEND to get appropriate dependency atoms.
17
18 Example usage:
19 RDEPEND="net-libs/gnutls
20 $(python_add_abi_dependencies ">=dev-python/PyQt4-4.7.7[svg]")
21 $(python_add_abi_dependencies -e "2.7 3.[2-9]" dev-python/argparse)"
22 DEPEND="${RDEPEND}
23 $(python_add_abi_dependencies dev-python/setuptools)
24 $(python_add_abi_dependencies -i "3.*" net-zope/zope-fixers)
25 test? ( $(python_add_abi_dependencies dev-python/py) )"
26
27 argparse module is included in Python 2.7 and >=3.2, so dev-python/argparse is needed only with
28 older Python versions. net-zope/zope-fixers is needed only with Python 3.
29
30 Subpatch #5 improves some code used in older EAPIs.
31
32 Subpatch #6 bans python_mod_compile() function (in older EAPIs), which has been deprecated for
33 almost 5 months (since 2010-05-25). This function isn't used in the tree.
34
35 Subpatch #7 fixes a typo in python_mod_optimize().
36
37 Subpatch #8 bans NEED_PYTHON variable (in older EAPIs), which has been deprecated for over
38 3 months (since 2010-07-17). This variable isn't used in the tree.
39
40 Subpatch #9 disallows not passing of paths to Python modules to python_mod_optimize() and
41 python_mod_cleanup(). Not passing of paths to Python modules to these functions has been
42 deprecated for almost 5 months (since 2010-05-25). Paths to Python modules are passed to these
43 functions in all ebuilds in the tree. The change in python_mod_cleanup() results in some
44 reindentation.
45
46 Subpatch #10 fixes exporting of python_pkg_setup() in EAPI >=4.
47
48 There will be other changes in API of python.eclass in EAPI >=4, so python.eclass still doesn't
49 support EAPI="4".
50
51 I'm planning to commit this patch in 1 week.
52
53 --
54 Arfrever Frehtes Taifersar Arahesis

Attachments

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

Replies

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>