Gentoo Archives: gentoo-commits

From: Krzysztof Pawlik <nelchael@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/nelchael:master commit in: eclass/
Date: Tue, 28 Feb 2012 20:52:32
Message-Id: 1330279971.64a68921294a806d350e0155ed96b74099c53f08.nelchael@gentoo
1 commit: 64a68921294a806d350e0155ed96b74099c53f08
2 Author: Krzysztof Pawlik <none <AT> none>
3 AuthorDate: Sun Feb 26 18:12:51 2012 +0000
4 Commit: Krzysztof Pawlik <nelchael <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 26 18:12:51 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/nelchael.git;a=commit;h=64a68921
7
8 Change USE_PYTHON to PYTHON_COMPAT.
9
10 ---
11 eclass/python-distutils-ng.eclass | 42 ++++++++++++++++++------------------
12 1 files changed, 21 insertions(+), 21 deletions(-)
13
14 diff --git a/eclass/python-distutils-ng.eclass b/eclass/python-distutils-ng.eclass
15 index 48de447..98e5721 100644
16 --- a/eclass/python-distutils-ng.eclass
17 +++ b/eclass/python-distutils-ng.eclass
18 @@ -15,18 +15,18 @@
19 #
20 # TODO: Document implementations!
21
22 -# @ECLASS-VARIABLE: USE_PYTHON
23 +# @ECLASS-VARIABLE: PYTHON_COMPAT
24 # @DESCRIPTION:
25 -# This variable contains a space separated list of targets (see above) a package
26 -# is compatible to. It must be set before the `inherit' call. The default is to
27 -# enable all targets.
28 +# This variable contains a space separated list of implementations (see above) a
29 +# package is compatible to. It must be set before the `inherit' call. The
30 +# default is to enable all implementations.
31
32 -if [[ -z "${USE_PYTHON}" ]]; then
33 +if [[ -z "${PYTHON_COMPAT}" ]]; then
34 # Default: pure python, support all implementations
35 - USE_PYTHON=" python2_5 python2_6 python2_7"
36 - USE_PYTHON+=" python3_1 python3_2"
37 - USE_PYTHON+=" jython2_5"
38 - USE_PYTHON+=" pypy1_7 pypy1_8"
39 + PYTHON_COMPAT=" python2_5 python2_6 python2_7"
40 + PYTHON_COMPAT+=" python3_1 python3_2"
41 + PYTHON_COMPAT+=" jython2_5"
42 + PYTHON_COMPAT+=" pypy1_7 pypy1_8"
43 fi
44
45 # @ECLASS-VARIABLE: PYTHON_OPTIONAL
46 @@ -58,7 +58,7 @@ esac
47 # @DESCRIPTION:
48 # This function returns the full package atom of a Python implementation.
49 #
50 -# `implementation' has to be one of the valid values for USE_PYTHON.
51 +# `implementation' has to be one of the valid values for PYTHON_COMPAT.
52 _python-distutils-ng_generate_depend() {
53 local impl="${1/_/.}"
54 case "${impl}" in
55 @@ -105,7 +105,7 @@ else
56 REQUIRED_USE+="${required_use_str}"
57 fi
58
59 -for impl in ${USE_PYTHON}; do
60 +for impl in ${PYTHON_COMPAT}; do
61 IUSE+=" python_targets_${impl} "
62 local dep_str="python_targets_${impl}? ( $(_python-distutils-ng_generate_depend "${impl}") )"
63
64 @@ -149,8 +149,8 @@ _python-distutils-ng_run_for_impl() {
65 _python-distutils-ng_run_for_all_impls() {
66 local command="${1}"
67
68 - for impl in ${USE_PYTHON}; do
69 - use "python_targets_${impl}" ${USE_PYTHON} || continue
70 + for impl in ${PYTHON_COMPAT}; do
71 + use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
72 _python-distutils-ng_run_for_impl "${impl}" "${command}"
73 done
74 }
75 @@ -248,8 +248,8 @@ python-distutils-ng_newscript() {
76
77 einfo "Installing ${source_file} for multiple implementations (default: ${default_impl})"
78 insinto /usr/bin
79 - for impl in ${USE_PYTHON}; do
80 - use "python_targets_${impl}" ${USE_PYTHON} || continue
81 + for impl in ${PYTHON_COMPAT}; do
82 + use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
83
84 newins "${source_file}" "${destination_file}-${impl}"
85 fperms 755 "/usr/bin/${destination_file}-${impl}"
86 @@ -279,8 +279,8 @@ python-distutils-ng_src_prepare() {
87 [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
88
89 # Try to run binary for each implementation:
90 - for impl in ${USE_PYTHON}; do
91 - use "python_targets_${impl}" ${USE_PYTHON} || continue
92 + for impl in ${PYTHON_COMPAT}; do
93 + use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
94 $(_python-distutils-ng_get_binary_for_implementation "${impl}") \
95 -c "import sys" || die
96 done
97 @@ -292,8 +292,8 @@ python-distutils-ng_src_prepare() {
98 fi
99
100 # Create a copy of S for each implementation:
101 - for impl in ${USE_PYTHON}; do
102 - use "python_targets_${impl}" ${USE_PYTHON} || continue
103 + for impl in ${PYTHON_COMPAT}; do
104 + use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
105
106 einfo "Creating copy for ${impl} in ${WORKDIR}/impl_${impl}"
107 mkdir -p "${WORKDIR}/impl_${impl}" || die
108 @@ -353,9 +353,9 @@ python-distutils-ng_src_install() {
109 python_install_all
110 fi
111
112 - for impl in ${USE_PYTHON}; do
113 + for impl in ${PYTHON_COMPAT}; do
114 [[ "${PYTHON_DISABLE_COMPILATION}" = "yes" ]] && continue
115 - use "python_targets_${impl}" ${USE_PYTHON} || continue
116 + use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
117
118 PYTHON="$(_python-distutils-ng_get_binary_for_implementation "${impl}")"
119 for accessible_path in $(${PYTHON} -c 'import sys; print " ".join(sys.path)'); do