Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-python] [PATCH python-distutils-ng 4/4] Temporarily remove PYTHON_OPTIONAL -- it is mis-designed.
Date: Sat, 08 Sep 2012 22:00:00
Message-Id: 1347141637-1148-5-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] python-distutils-ng -- the future? by "Michał Górny"
1 Let's remove it quickly before someone starts relying on it. Hopefully,
2 noone outside the tree started to do that -- assumption based
3 on the fact that it is very unlikely for a package to want optional
4 distutils.
5 ---
6 gx86/eclass/python-distutils-ng.eclass | 32 +++-----------------------------
7 1 file changed, 3 insertions(+), 29 deletions(-)
8
9 diff --git a/gx86/eclass/python-distutils-ng.eclass b/gx86/eclass/python-distutils-ng.eclass
10 index 4093600..3ba6988 100644
11 --- a/gx86/eclass/python-distutils-ng.eclass
12 +++ b/gx86/eclass/python-distutils-ng.eclass
13 @@ -49,12 +49,6 @@ if [[ -z "${PYTHON_COMPAT}" ]]; then
14 PYTHON_COMPAT+=" pypy1_8 pypy1_9"
15 fi
16
17 -# @ECLASS-VARIABLE: PYTHON_OPTIONAL
18 -# @DEFAULT_UNSET
19 -# @DESCRIPTION:
20 -# Set the value to "yes" to make the dependency on a Python interpreter
21 -# optional.
22 -
23 # @ECLASS-VARIABLE: PYTHON_DISABLE_COMPILATION
24 # @DEFAULT_UNSET
25 # @DESCRIPTION:
26 @@ -106,12 +100,7 @@ for impl in ${PYTHON_COMPAT}; do
27 required_use_str+=" python_targets_${impl}"
28 done
29 required_use_str=" || ( ${required_use_str} )"
30 -if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
31 - IUSE+=" python"
32 - REQUIRED_USE+=" python? ( ${required_use_str} )"
33 -else
34 - REQUIRED_USE+=" ${required_use_str}"
35 -fi
36 +REQUIRED_USE+=" ${required_use_str}"
37 unset required_use_str
38
39 for impl in ${PYTHON_COMPAT}; do
40 @@ -129,13 +118,8 @@ for impl in ${PYTHON_COMPAT}; do
41 esac
42 dep_str="python_targets_${impl}? ( ${dep_str} )"
43
44 - if [[ "${PYTHON_OPTIONAL}" = "yes" ]]; then
45 - RDEPEND="${RDEPEND} python? ( ${dep_str} )"
46 - DEPEND="${DEPEND} python? ( ${dep_str} )"
47 - else
48 - RDEPEND="${RDEPEND} ${dep_str}"
49 - DEPEND="${DEPEND} ${dep_str}"
50 - fi
51 + RDEPEND="${RDEPEND} ${dep_str}"
52 + DEPEND="${DEPEND} ${dep_str}"
53 unset dep_str
54 done
55
56 @@ -312,8 +296,6 @@ python-distutils-ng_newscript() {
57
58 # Phase function: src_prepare
59 python-distutils-ng_src_prepare() {
60 - [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
61 -
62 # Try to run binary for each implementation:
63 for impl in ${PYTHON_COMPAT}; do
64 use "python_targets_${impl}" ${PYTHON_COMPAT} || continue
65 @@ -344,8 +326,6 @@ python-distutils-ng_src_prepare() {
66
67 # Phase function: src_configure
68 python-distutils-ng_src_configure() {
69 - [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
70 -
71 if type python_configure &> /dev/null; then
72 _python-distutils-ng_run_for_each_impl python_configure
73 fi
74 @@ -353,8 +333,6 @@ python-distutils-ng_src_configure() {
75
76 # Phase function: src_compile
77 python-distutils-ng_src_compile() {
78 - [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
79 -
80 if type python_compile &> /dev/null; then
81 _python-distutils-ng_run_for_each_impl python_compile
82 else
83 @@ -365,8 +343,6 @@ python-distutils-ng_src_compile() {
84
85 # Phase function: src_test
86 python-distutils-ng_src_test() {
87 - [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
88 -
89 if type python_test &> /dev/null; then
90 _python-distutils-ng_run_for_each_impl python_test
91 fi
92 @@ -374,8 +350,6 @@ python-distutils-ng_src_test() {
93
94 # Phase function: src_install
95 python-distutils-ng_src_install() {
96 - [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; }
97 -
98 if type python_install &> /dev/null; then
99 _python-distutils-ng_run_for_each_impl python_install
100 else
101 --
102 1.7.12