Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy/files/, dev-python/pypy/
Date: Sat, 16 Feb 2019 15:08:41
Message-Id: 1550329701.4c0261d9ad80c7ffbb7c3cd82b06cbed86f5eb33.mgorny@gentoo
1 commit: 4c0261d9ad80c7ffbb7c3cd82b06cbed86f5eb33
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 16 14:33:31 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 16 15:08:21 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0261d9
7
8 dev-python/pypy: Restore Gentoo path patch
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pypy/files/7.0.0-gentoo-path.patch | 52 ++++++++++++++++++++++
13 .../{pypy-7.0.0.ebuild => pypy-7.0.0-r1.ebuild} | 4 ++
14 dev-python/pypy/pypy-9999.ebuild | 4 ++
15 3 files changed, 60 insertions(+)
16
17 diff --git a/dev-python/pypy/files/7.0.0-gentoo-path.patch b/dev-python/pypy/files/7.0.0-gentoo-path.patch
18 new file mode 100644
19 index 00000000000..9be52cd0b75
20 --- /dev/null
21 +++ b/dev-python/pypy/files/7.0.0-gentoo-path.patch
22 @@ -0,0 +1,52 @@
23 +From 959e2aafbe6cabd4e6860f842bce9b8644f627ca 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/2.7/distutils/command/install.py | 13 ++++++++++++-
39 + 1 file changed, 12 insertions(+), 1 deletion(-)
40 +
41 +diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py
42 +index fc43951da0..c2564188cb 100644
43 +--- a/lib-python/2.7/distutils/command/install.py
44 ++++ b/lib-python/2.7/distutils/command/install.py
45 +@@ -90,6 +90,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 + # The keys to an installation scheme; if any new types of files are to be
59 +@@ -476,7 +483,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/pypy2.7'):
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/pypy/pypy-7.0.0.ebuild b/dev-python/pypy/pypy-7.0.0-r1.ebuild
77 similarity index 98%
78 rename from dev-python/pypy/pypy-7.0.0.ebuild
79 rename to dev-python/pypy/pypy-7.0.0-r1.ebuild
80 index b3575616959..7a956b9f4a0 100644
81 --- a/dev-python/pypy/pypy-7.0.0.ebuild
82 +++ b/dev-python/pypy/pypy-7.0.0-r1.ebuild
83 @@ -99,9 +99,13 @@ 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
91 + sed -e "s^@EPREFIX@^${EPREFIX}^" \
92 + -i lib-python/2.7/distutils/command/install.py || die
93 +
94 # apply CPython stdlib patches
95 pushd lib-python/2.7 > /dev/null || die
96 # TODO: cpy turkish locale patch now fixes C code
97
98 diff --git a/dev-python/pypy/pypy-9999.ebuild b/dev-python/pypy/pypy-9999.ebuild
99 index 762e9c5e7e9..708273fc4d5 100644
100 --- a/dev-python/pypy/pypy-9999.ebuild
101 +++ b/dev-python/pypy/pypy-9999.ebuild
102 @@ -105,9 +105,13 @@ src_unpack() {
103 }
104
105 src_prepare() {
106 + eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
107 eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
108 eapply "${FILESDIR}"/5.9.0-shared-lib.patch # 517002
109
110 + sed -e "s^@EPREFIX@^${EPREFIX}^" \
111 + -i lib-python/2.7/distutils/command/install.py || die
112 +
113 # apply CPython stdlib patches
114 pushd lib-python/2.7 > /dev/null || die
115 # TODO: cpy turkish locale patch now fixes C code