1 |
commit: 233a876f75e258f9e72383917a1c2ee40ca55aa6 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 16 14:45:01 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 16 15:08:24 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=233a876f |
7 |
|
8 |
dev-python/pypy3: Restore Gentoo path patch |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/pypy3/files/7.0.0-gentoo-path.patch | 52 ++++++++++++++++++++++ |
13 |
.../{pypy3-7.0.0.ebuild => pypy3-7.0.0-r1.ebuild} | 4 ++ |
14 |
dev-python/pypy3/pypy3-9999.ebuild | 4 ++ |
15 |
3 files changed, 60 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/pypy3/files/7.0.0-gentoo-path.patch b/dev-python/pypy3/files/7.0.0-gentoo-path.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..17409fa89a4 |
20 |
--- /dev/null |
21 |
+++ b/dev-python/pypy3/files/7.0.0-gentoo-path.patch |
22 |
@@ -0,0 +1,52 @@ |
23 |
+From 44c16c344f137cc91a145294c4124174fc25ad16 Mon Sep 17 00:00:00 2001 |
24 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
25 |
+Date: Fri, 27 Nov 2015 17:02:42 +0100 |
26 |
+Subject: [PATCH] Gentoo: override paths for system-wide install based on |
27 |
+ sys.prefix |
28 |
+ |
29 |
+Override all default distutils install paths to ones suitable for |
30 |
+system-wide install when sys.prefix indicates we're running the Gentoo |
31 |
+system-wide install of PyPy with no prefix overrides (e.g. virtualenv). |
32 |
+ |
33 |
+Fixes: https://bugs.gentoo.org/462306 |
34 |
+Fixes: https://bugs.gentoo.org/465546 |
35 |
+ |
36 |
+[updated for 7.0.0] |
37 |
+--- |
38 |
+ lib-python/3/distutils/command/install.py | 13 ++++++++++++- |
39 |
+ 1 file changed, 12 insertions(+), 1 deletion(-) |
40 |
+ |
41 |
+diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py |
42 |
+index 77a1827d4b..255603967f 100644 |
43 |
+--- a/lib-python/3/distutils/command/install.py |
44 |
++++ b/lib-python/3/distutils/command/install.py |
45 |
+@@ -50,6 +50,13 @@ INSTALL_SCHEMES = { |
46 |
+ 'scripts': '$base/bin', |
47 |
+ 'data' : '$base', |
48 |
+ }, |
49 |
++ 'gentoo': { |
50 |
++ 'purelib': '$base/site-packages', |
51 |
++ 'platlib': '$base/site-packages', |
52 |
++ 'headers': '$base/include', |
53 |
++ 'scripts': '@EPREFIX@/usr/bin', |
54 |
++ 'data' : '@EPREFIX@/usr', |
55 |
++ }, |
56 |
+ } |
57 |
+ |
58 |
+ # user site schemes |
59 |
+@@ -461,7 +468,11 @@ class install(Command): |
60 |
+ # it's the caller's problem if they supply a bad name! |
61 |
+ if (hasattr(sys, 'pypy_version_info') and |
62 |
+ not name.endswith(('_user', '_home'))): |
63 |
+- name = 'pypy' |
64 |
++ if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy3.5'): |
65 |
++ # override paths for system-wide install |
66 |
++ name = 'gentoo' |
67 |
++ else: |
68 |
++ name = 'pypy' |
69 |
+ scheme = INSTALL_SCHEMES[name] |
70 |
+ for key in SCHEME_KEYS: |
71 |
+ attrname = 'install_' + key |
72 |
+-- |
73 |
+2.21.0.rc1 |
74 |
+ |
75 |
|
76 |
diff --git a/dev-python/pypy3/pypy3-7.0.0.ebuild b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild |
77 |
similarity index 97% |
78 |
rename from dev-python/pypy3/pypy3-7.0.0.ebuild |
79 |
rename to dev-python/pypy3/pypy3-7.0.0-r1.ebuild |
80 |
index c318a1f521a..87ce4dbc248 100644 |
81 |
--- a/dev-python/pypy3/pypy3-7.0.0.ebuild |
82 |
+++ b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild |
83 |
@@ -84,10 +84,14 @@ pkg_setup() { |
84 |
} |
85 |
|
86 |
src_prepare() { |
87 |
+ eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
88 |
eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
89 |
eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
90 |
eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch |
91 |
|
92 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
93 |
+ -i lib-python/3/distutils/command/install.py || die |
94 |
+ |
95 |
# apply CPython stdlib patches |
96 |
pushd lib-python/3 > /dev/null || die |
97 |
eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |
98 |
|
99 |
diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild |
100 |
index 3b0362d0252..236616d1f28 100644 |
101 |
--- a/dev-python/pypy3/pypy3-9999.ebuild |
102 |
+++ b/dev-python/pypy3/pypy3-9999.ebuild |
103 |
@@ -92,10 +92,14 @@ src_unpack() { |
104 |
} |
105 |
|
106 |
src_prepare() { |
107 |
+ eapply "${FILESDIR}/7.0.0-gentoo-path.patch" |
108 |
eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" |
109 |
eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002 |
110 |
eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch |
111 |
|
112 |
+ sed -e "s^@EPREFIX@^${EPREFIX}^" \ |
113 |
+ -i lib-python/3/distutils/command/install.py || die |
114 |
+ |
115 |
# apply CPython stdlib patches |
116 |
pushd lib-python/3 > /dev/null || die |
117 |
eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |