Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python@l.g.o, python@g.o
Subject: [gentoo-python] Re: [PATCH python-r1] Move validity checks into _python_obtain_impls.
Date: Wed, 06 Mar 2013 15:28:30
Message-Id: CAJ0EP41T74CptO535bhEWwpR3KNprdSSkwjc4H3eAqEHCVRPoA@mail.gmail.com
In Reply to: [gentoo-python] [PATCH python-r1] Move validity checks into _python_obtain_impls. by "Michał Górny"
1 On Wed, Mar 6, 2013 at 9:31 AM, Michał Górny <mgorny@g.o> wrote:
2 > That is, _python_check_USE_PYTHON and _python_validate_useflags. Those
3 > are always used along with per-implementation tasks, so better to have
4 > them in _python_obtain_impls than call three functions every time.
5 >
6 > Also, remove redundant invocation.
7 >
8 > Note: rebased on multibuild_copy_sources() patch branch.
9 > ---
10 > gx86/eclass/python-r1.eclass | 11 +++--------
11 > 1 file changed, 3 insertions(+), 8 deletions(-)
12 >
13 > diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
14 > index 36b20dc..9e625f5 100644
15 > --- a/gx86/eclass/python-r1.eclass
16 > +++ b/gx86/eclass/python-r1.eclass
17 > @@ -357,9 +357,6 @@ python_gen_cond_dep() {
18 > python_copy_sources() {
19 > debug-print-function ${FUNCNAME} "${@}"
20 >
21 > - _python_validate_useflags
22 > - _python_check_USE_PYTHON
23 > -
24 > local MULTIBUILD_VARIANTS
25 > _python_obtain_impls
26 >
27 > @@ -579,6 +576,9 @@ _python_check_USE_PYTHON() {
28 > # @DESCRIPTION:
29 > # Set up the enabled implementation list.
30 > _python_obtain_impls() {
31 > + _python_validate_useflags
32 > + _python_check_USE_PYTHON
33 > +
34 > MULTIBUILD_VARIANTS=()
35 >
36 > for impl in "${_PYTHON_ALL_IMPLS[@]}"; do
37 > @@ -621,9 +621,6 @@ _python_multibuild_wrapper() {
38 > python_foreach_impl() {
39 > debug-print-function ${FUNCNAME} "${@}"
40 >
41 > - _python_validate_useflags
42 > - _python_check_USE_PYTHON
43 > -
44 > local MULTIBUILD_VARIANTS
45 > _python_obtain_impls
46 >
47 > @@ -695,8 +692,6 @@ python_export_best() {
48 > python_replicate_script() {
49 > debug-print-function ${FUNCNAME} "${@}"
50 >
51 > - _python_validate_useflags
52 > -
53 > local suffixes=()
54 >
55 > _add_suffix() {
56 > --
57 > 1.8.1.5
58 >
59
60 ok