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