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 python-utils-r1 4/4] Support PyPy3 as Py3k provider.
Date: Wed, 21 Aug 2013 19:55:00
Message-Id: 1377114866-2669-4-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] [PATCHES] Initial python-utils-r1 changes for PyPy 2.1 by "Michał Górny"
1 ---
2 gx86/eclass/python-utils-r1.eclass | 28 +++++++++++++++++++++-------
3 1 file changed, 21 insertions(+), 7 deletions(-)
4
5 diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass
6 index c34bcbd..9c9b417 100644
7 --- a/gx86/eclass/python-utils-r1.eclass
8 +++ b/gx86/eclass/python-utils-r1.eclass
9 @@ -339,20 +339,34 @@ python_export() {
10 debug-print "${FUNCNAME}: PYTHON_LIBS = ${PYTHON_LIBS}"
11 ;;
12 PYTHON_PKG_DEP)
13 - local d
14 + local d slot
15 case ${impl} in
16 python*)
17 - PYTHON_PKG_DEP='dev-lang/python';;
18 + PYTHON_PKG_DEP='dev-lang/python'
19 + slot=${impl#python}
20 + ;;
21 jython*)
22 - PYTHON_PKG_DEP='dev-java/jython';;
23 - pypy*)
24 - PYTHON_PKG_DEP='virtual/pypy';;
25 + PYTHON_PKG_DEP='dev-java/jython'
26 + slot=${impl#jython}
27 + ;;
28 + pypy-c*)
29 + PYTHON_PKG_DEP='virtual/pypy'
30 + slot=${impl#pypy-c}
31 + ;;
32 + pypy-*)
33 + PYTHON_PKG_DEP='virtual/pypy'
34 + slot=${impl#pypy-}
35 + ;;
36 + pypy3-*)
37 + PYTHON_PKG_DEP='virtual/pypy3'
38 + slot=${impl#pypy3-}
39 + ;;
40 *)
41 die "Invalid implementation: ${impl}"
42 esac
43
44 # slot
45 - PYTHON_PKG_DEP+=:${impl##*[a-z-]}
46 + PYTHON_PKG_DEP+=:${slot}
47
48 # use-dep
49 if [[ ${PYTHON_REQ_USE} ]]; then
50 @@ -956,7 +970,7 @@ python_is_python3() {
51 local impl=${1:-${EPYTHON}}
52 [[ ${impl} ]] || die "python_is_python3: no impl nor EPYTHON"
53
54 - [[ ${impl} == python3* ]]
55 + [[ ${impl} == python3* || ${impl} == pypy3* ]]
56 }
57
58 _PYTHON_UTILS_R1=1
59 --
60 1.8.3.2