1 |
arfrever 10/10/29 19:09:08 |
2 |
|
3 |
Modified: python.eclass |
4 |
Log: |
5 |
Temporarily delete some code. |
6 |
|
7 |
Revision Changes Path |
8 |
1.105 eclass/python.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.eclass?rev=1.105&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.eclass?rev=1.105&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.eclass?r1=1.104&r2=1.105 |
13 |
|
14 |
Index: python.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v |
17 |
retrieving revision 1.104 |
18 |
retrieving revision 1.105 |
19 |
diff -u -r1.104 -r1.105 |
20 |
--- python.eclass 25 Oct 2010 11:54:19 -0000 1.104 |
21 |
+++ python.eclass 29 Oct 2010 19:09:08 -0000 1.105 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2010 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.104 2010/10/25 11:54:19 arfrever Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.105 2010/10/29 19:09:08 arfrever Exp $ |
27 |
|
28 |
# @ECLASS: python.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -24,31 +24,6 @@ |
31 |
# ===================================== HANDLING OF METADATA ===================================== |
32 |
# ================================================================================================ |
33 |
|
34 |
-_python_set_IUSE() { |
35 |
- local PYTHON_ABI restricted_ABI restricted_ABIs support_ABI |
36 |
- |
37 |
- _PYTHON_ABIS_USE_FLAGS="" |
38 |
- restricted_ABIs="${RESTRICT_PYTHON_ABIS// /$'\n'}" |
39 |
- |
40 |
- for PYTHON_ABI in "${_PYTHON_SUPPORTED_ABIS[@]}"; do |
41 |
- support_ABI="1" |
42 |
- while read restricted_ABI; do |
43 |
- if [[ "${PYTHON_ABI}" == ${restricted_ABI} ]]; then |
44 |
- support_ABI="0" |
45 |
- break |
46 |
- fi |
47 |
- done <<< "${restricted_ABIs}" |
48 |
- [[ "${support_ABI}" == "1" ]] && _PYTHON_ABIS_USE_FLAGS+="${_PYTHON_ABIS_USE_FLAGS:+ }python_abis_${PYTHON_ABI}" |
49 |
- done |
50 |
- |
51 |
- IUSE="${_PYTHON_ABIS_USE_FLAGS}" |
52 |
-} |
53 |
- |
54 |
-if ! has "${EAPI:-0}" 0 1 2 3 && [[ -n "${SUPPORT_PYTHON_ABIS}" ]]; then |
55 |
- _python_set_IUSE |
56 |
-fi |
57 |
-unset -f _python_set_IUSE |
58 |
- |
59 |
# @ECLASS-VARIABLE: PYTHON_DEPEND |
60 |
# @DESCRIPTION: |
61 |
# Specification of dependency on dev-lang/python. |
62 |
@@ -239,135 +214,6 @@ |
63 |
|
64 |
unset _PYTHON_ATOMS |
65 |
|
66 |
-# @FUNCTION: python_abi_depend |
67 |
-# @USAGE: [-e|--exclude-ABIs Python_ABIs] [-i|--include-ABIs Python_ABIs] [--] <dependency_atom> [dependency_atoms] |
68 |
-# @DESCRIPTION: |
69 |
-# Print dependency atoms with USE dependencies for Python ABIs added. |
70 |
-# If --exclude-ABIs option is specified, then Python ABIs matching its argument are not used. |
71 |
-# If --include-ABIs option is specified, then only Python ABIs matching its argument are used. |
72 |
-# --exclude-ABIs and --include-ABIs options cannot be specified simultaneously. |
73 |
-python_abi_depend() { |
74 |
- local atom atom_index atoms=() exclude_ABIs="0" excluded_ABI excluded_ABIs include_ABIs="0" included_ABI included_ABIs support_ABI USE_dependencies USE_flag USE_flag_index USE_flags=() |
75 |
- |
76 |
- if has "${EAPI:-0}" 0 1 2 3; then |
77 |
- die "${FUNCNAME}() cannot be used in this EAPI" |
78 |
- fi |
79 |
- |
80 |
- if [[ -z "${SUPPORT_PYTHON_ABIS}" ]]; then |
81 |
- die "${FUNCNAME}() cannot be used in ebuilds of packages not supporting installation for multiple Python ABIs" |
82 |
- fi |
83 |
- |
84 |
- while (($#)); do |
85 |
- case "$1" in |
86 |
- -e|--exclude-ABIs) |
87 |
- exclude_ABIs="1" |
88 |
- excluded_ABIs="${2// /$'\n'}" |
89 |
- shift |
90 |
- ;; |
91 |
- -i|--include-ABIs) |
92 |
- include_ABIs="1" |
93 |
- included_ABIs="${2// /$'\n'}" |
94 |
- shift |
95 |
- ;; |
96 |
- --) |
97 |
- shift |
98 |
- break |
99 |
- ;; |
100 |
- -*) |
101 |
- die "${FUNCNAME}(): Unrecognized option '$1'" |
102 |
- ;; |
103 |
- *) |
104 |
- break |
105 |
- ;; |
106 |
- esac |
107 |
- shift |
108 |
- done |
109 |
- |
110 |
- if [[ "${exclude_ABIs}" == "1" && "${include_ABIs}" == "1" ]]; then |
111 |
- die "${FUNCNAME}(): '--exclude-ABIs' and '--include-ABIs' options cannot be specified simultaneously" |
112 |
- fi |
113 |
- |
114 |
- if [[ "$#" -eq 0 ]]; then |
115 |
- die "${FUNCNAME}(): Missing dependency atoms" |
116 |
- fi |
117 |
- |
118 |
- atoms=("$@") |
119 |
- |
120 |
- if [[ "${exclude_ABIs}" == "0" && "${include_ABIs}" == "0" ]]; then |
121 |
- USE_dependencies="$(printf ",%s?" ${_PYTHON_ABIS_USE_FLAGS})" |
122 |
- USE_dependencies="${USE_dependencies#,}" |
123 |
- |
124 |
- for atom_index in "${!atoms[@]}"; do |
125 |
- atom="${atoms[${atom_index}]}" |
126 |
- |
127 |
- if [[ "${atom}" == *"["*"]" ]]; then |
128 |
- echo -n "${atom%]}," |
129 |
- else |
130 |
- echo -n "${atom}[" |
131 |
- fi |
132 |
- echo -n "${USE_dependencies}]" |
133 |
- |
134 |
- if [[ "${atom_index}" -ne $((${#atoms[@]} - 1)) ]]; then |
135 |
- echo -n " " |
136 |
- fi |
137 |
- done |
138 |
- else |
139 |
- if [[ "${exclude_ABIs}" == "1" ]]; then |
140 |
- for USE_flag in ${_PYTHON_ABIS_USE_FLAGS}; do |
141 |
- while read excluded_ABI; do |
142 |
- support_ABI="1" |
143 |
- if [[ "${USE_flag}" == python_abis_${excluded_ABI} ]]; then |
144 |
- support_ABI="0" |
145 |
- break |
146 |
- fi |
147 |
- done <<< "${excluded_ABIs}" |
148 |
- [[ "${support_ABI}" == "1" ]] && USE_flags+=("${USE_flag}") |
149 |
- done |
150 |
- elif [[ "${include_ABIs}" == "1" ]]; then |
151 |
- for USE_flag in ${_PYTHON_ABIS_USE_FLAGS}; do |
152 |
- while read included_ABI; do |
153 |
- support_ABI="0" |
154 |
- if [[ "${USE_flag}" == python_abis_${included_ABI} ]]; then |
155 |
- support_ABI="1" |
156 |
- break |
157 |
- fi |
158 |
- done <<< "${included_ABIs}" |
159 |
- [[ "${support_ABI}" == "1" ]] && USE_flags+=("${USE_flag}") |
160 |
- done |
161 |
- else |
162 |
- die "${FUNCNAME}(): Internal error" |
163 |
- fi |
164 |
- |
165 |
- for USE_flag_index in "${!USE_flags[@]}"; do |
166 |
- USE_flag="${USE_flags[${USE_flag_index}]}" |
167 |
- USE_dependencies="${USE_flag}" |
168 |
- |
169 |
- echo -n "${USE_flag}? ( " |
170 |
- |
171 |
- for atom_index in "${!atoms[@]}"; do |
172 |
- atom="${atoms[${atom_index}]}" |
173 |
- |
174 |
- if [[ "${atom}" == *"["*"]" ]]; then |
175 |
- echo -n "${atom%]}," |
176 |
- else |
177 |
- echo -n "${atom}[" |
178 |
- fi |
179 |
- echo -n "${USE_dependencies}]" |
180 |
- |
181 |
- if [[ "${atom_index}" -ne $((${#atoms[@]} - 1)) ]]; then |
182 |
- echo -n " " |
183 |
- fi |
184 |
- done |
185 |
- |
186 |
- echo -n " )" |
187 |
- |
188 |
- if [[ "${USE_flag_index}" -ne $((${#USE_flags[@]} - 1)) ]]; then |
189 |
- echo -n " " |
190 |
- fi |
191 |
- done |
192 |
- fi |
193 |
-} |
194 |
- |
195 |
# ================================================================================================ |
196 |
# =================================== MISCELLANEOUS FUNCTIONS ==================================== |
197 |
# ================================================================================================ |