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 3/4] Add support for PyPy 2.1 paths.
Date: Wed, 21 Aug 2013 19:54:58
Message-Id: 1377114866-2669-3-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 | 25 ++++++++++++++-----------
3 1 file changed, 14 insertions(+), 11 deletions(-)
4
5 diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass
6 index e798c8d..c34bcbd 100644
7 --- a/gx86/eclass/python-utils-r1.eclass
8 +++ b/gx86/eclass/python-utils-r1.eclass
9 @@ -215,19 +215,19 @@ python_export() {
10 local impl var
11
12 case "${1}" in
13 - python*|jython*)
14 - impl=${1/_/.}
15 - shift
16 - ;;
17 pypy-c*)
18 impl=${1}
19 shift
20 ;;
21 - pypy*)
22 + pypy1*|pypy2_0)
23 local v=${1#pypy}
24 impl=pypy-c${v/_/.}
25 shift
26 ;;
27 + python*|jython*|pypy-*)
28 + impl=${1/_/.}
29 + shift
30 + ;;
31 *)
32 impl=${EPYTHON}
33 [[ ${impl} ]] || die "python_export: no impl nor EPYTHON"
34 @@ -248,15 +248,15 @@ python_export() {
35 PYTHON_SITEDIR)
36 local dir
37 case "${impl}" in
38 - python*)
39 - dir=/usr/$(get_libdir)/${impl}
40 - ;;
41 jython*)
42 dir=/usr/share/${impl}/Lib
43 ;;
44 - pypy*)
45 + pypy-c*)
46 dir=/usr/$(get_libdir)/${impl/-c/}
47 ;;
48 + python*|pypy*)
49 + dir=/usr/$(get_libdir)/${impl}
50 + ;;
51 esac
52
53 export PYTHON_SITEDIR=${EPREFIX}${dir}/site-packages
54 @@ -271,9 +271,12 @@ python_export() {
55 jython*)
56 dir=/usr/share/${impl}/Include
57 ;;
58 - pypy*)
59 + pypy-c*)
60 dir=/usr/$(get_libdir)/${impl/-c/}/include
61 ;;
62 + pypy*)
63 + dir=/usr/$(get_libdir)/${impl}/include
64 + ;;
65 esac
66
67 export PYTHON_INCLUDEDIR=${EPREFIX}${dir}
68 @@ -500,7 +503,7 @@ _python_rewrite_shebang() {
69
70 local impl
71 case "${1}" in
72 - python*|jython*|pypy-c*)
73 + python*|jython*|pypy*)
74 impl=${1}
75 shift
76 ;;
77 --
78 1.8.3.2