Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-python] [PATCH 2/3] Disallow using python-r1 & python-single-r1 together.
Date: Wed, 28 Nov 2012 12:12:10
Message-Id: 1354104802-25167-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] [PATCH 1/3] Make python-single-r1 stand-alone. by "Michał Górny"
1 ---
2 gx86/eclass/python-r1.eclass | 4 ++++
3 gx86/eclass/python-single-r1.eclass | 15 +++++++++++----
4 2 files changed, 15 insertions(+), 4 deletions(-)
5
6 diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
7 index 9a02df3..c8cfef3 100644
8 --- a/gx86/eclass/python-r1.eclass
9 +++ b/gx86/eclass/python-r1.eclass
10 @@ -42,6 +42,10 @@ esac
11
12 if [[ ! ${_PYTHON_R1} ]]; then
13
14 +if [[ ${_PYTHON_SINGLE_R1} ]]; then
15 + die 'python-r1.eclass can not be used with python-single-r1.eclass.'
16 +fi
17 +
18 inherit python-utils-r1
19
20 # @ECLASS-VARIABLE: PYTHON_COMPAT
21 diff --git a/gx86/eclass/python-single-r1.eclass b/gx86/eclass/python-single-r1.eclass
22 index 3aa350b..f645513 100644
23 --- a/gx86/eclass/python-single-r1.eclass
24 +++ b/gx86/eclass/python-single-r1.eclass
25 @@ -23,10 +23,10 @@
26 # (using python-r1 eclass) can not depend on packages not supporting
27 # them (using this eclass).
28 #
29 -# Please note that python-r1 will always inherit python-utils-r1 as
30 -# well. Thus, all the functions defined there can be used
31 -# in the packages using python-r1, and there is no need ever to inherit
32 -# both.
33 +# Please note that python-single-r1 will always inherit python-utils-r1
34 +# as well. Thus, all the functions defined there can be used
35 +# in the packages using python-single-r1, and there is no need ever
36 +# to inherit both.
37 #
38 # For more information, please see the python-r1 Developer's Guide:
39 # http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml
40 @@ -45,6 +45,10 @@ esac
41
42 if [[ ! ${_PYTHON_SINGLE_R1} ]]; then
43
44 +if [[ ${_PYTHON_R1} ]]; then
45 + die 'python-single-r1.eclass can not be used with python-r1.eclass.'
46 +fi
47 +
48 inherit python-utils-r1
49
50 fi
51 @@ -182,3 +186,6 @@ python-single-r1_pkg_setup() {
52 fi
53 done
54 }
55 +
56 +_PYTHON_SINGLE_R1=1
57 +fi
58 --
59 1.8.0