Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: python@g.o
Subject: [gentoo-dev] [PATCHES] python-r1 suite: minor fixes
Date: Sat, 20 May 2017 08:56:33
Message-Id: 20170520085616.5602-1-mgorny@gentoo.org
1 Hi,
2
3 Here's a quick set of minor patches to python-r1 suite. It mostly
4 includes some fixes to issues I've noticed while working on something
5 bigger ;-).
6
7 The first patch merely fixes missing 'local' for a variable. The second
8 adds REQUIRED_USE to the python_setup() use example in python-r1.
9 The third converts distutils-r1 common impl support to use the new
10 pattern matching function (which is an omission from the original set
11 of patches).
12
13 The fourth patch is most interesting of all -- it makes the pattern
14 matching work well with mismatched PYTHON_COMPAT/EPYTHON-style impls.
15 This makes the API more lax, and avoids requiring users to be aware
16 of technically implied impl style restrictions, i.e. having to write:
17
18 REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2_*') ) )"
19
20 src_compile() {
21 use doc && python_setup 'python2.*'
22 }
23
24 Note that flags used PYTHON_COMPAT form (with '_') while setup functions
25 used EPYTHON form (with '.'). Now both are equally happy with both
26 forms.
27
28 --
29 Best regards,
30 Michał Górny

Replies