Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH python-r1] Depend on python-exec in python-r1.
Date: Sat, 27 Oct 2012 14:16:29
Message-Id: 1351347399-5663-1-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH python-r1 1/8] python_export: support obtaining site-packages directory. by "Michał Górny"
1 Due to python_replicate_scripts(), now python-r1 ebuilds can rely on
2 python-exec as well. It shouldn't hurt much, so let's just put it
3 in the PYTHON_DEPS.
4 ---
5 gx86/eclass/distutils-r1.eclass | 3 +--
6 gx86/eclass/python-r1.eclass | 14 +++++++++-----
7 2 files changed, 10 insertions(+), 7 deletions(-)
8
9 diff --git a/gx86/eclass/distutils-r1.eclass b/gx86/eclass/distutils-r1.eclass
10 index e0df9f6..8dfe6bb 100644
11 --- a/gx86/eclass/distutils-r1.eclass
12 +++ b/gx86/eclass/distutils-r1.eclass
13 @@ -56,8 +56,7 @@ inherit eutils python-r1
14
15 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
16
17 -RDEPEND="${PYTHON_DEPS}
18 - dev-python/python-exec"
19 +RDEPEND=${PYTHON_DEPS}
20 DEPEND=${PYTHON_DEPS}
21
22 # @ECLASS-VARIABLE: PATCHES
23 diff --git a/gx86/eclass/python-r1.eclass b/gx86/eclass/python-r1.eclass
24 index 6178969..45dfcee 100644
25 --- a/gx86/eclass/python-r1.eclass
26 +++ b/gx86/eclass/python-r1.eclass
27 @@ -137,7 +137,14 @@ _python_set_globals() {
28 REQUIRED_USE="|| ( ${flags[*]} )"
29 PYTHON_USEDEP=${optflags// /,}
30
31 - PYTHON_DEPS=
32 + local usestr
33 + [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
34 +
35 + # 1) well, python-exec would suffice as an RDEP
36 + # but no point in making this overcomplex, BDEP doesn't hurt anyone
37 + # 2) python-exec should be built with all targets forced anyway
38 + # but if new targets were added, we may need to force a rebuild
39 + PYTHON_DEPS="dev-python/python-exec[${PYTHON_USEDEP}]"
40 local i
41 for i in "${PYTHON_COMPAT[@]}"; do
42 local d
43 @@ -153,10 +160,7 @@ _python_set_globals() {
44 esac
45
46 local v=${i##*[a-z]}
47 - local usestr
48 - [[ ${PYTHON_REQ_USE} ]] && usestr="[${PYTHON_REQ_USE}]"
49 - PYTHON_DEPS+=" python_targets_${i}? (
50 - ${d}:${v/_/.}${usestr} )"
51 + PYTHON_DEPS+=" python_targets_${i}? ( ${d}:${v/_/.}${usestr} )"
52 done
53 }
54 _python_set_globals
55 --
56 1.7.12.4