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-bin/files/, dev-python/pypy-bin/
Date: Sat, 16 Feb 2019 15:08:42
Message-Id: 1550329703.cafa64a947b51070d0fe3869818bf2231c072f47.mgorny@gentoo
1 commit: cafa64a947b51070d0fe3869818bf2231c072f47
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 16 14:34:21 2019 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 16 15:08:23 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cafa64a9
7
8 dev-python/pypy-bin: Restore Gentoo path patch
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/pypy-bin/files/7.0.0-gentoo-path.patch | 52 ++++++++++++++++++++++
13 ...y-bin-7.0.0.ebuild => pypy-bin-7.0.0-r1.ebuild} | 4 ++
14 2 files changed, 56 insertions(+)
15
16 diff --git a/dev-python/pypy-bin/files/7.0.0-gentoo-path.patch b/dev-python/pypy-bin/files/7.0.0-gentoo-path.patch
17 new file mode 100644
18 index 00000000000..9be52cd0b75
19 --- /dev/null
20 +++ b/dev-python/pypy-bin/files/7.0.0-gentoo-path.patch
21 @@ -0,0 +1,52 @@
22 +From 959e2aafbe6cabd4e6860f842bce9b8644f627ca 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/2.7/distutils/command/install.py | 13 ++++++++++++-
38 + 1 file changed, 12 insertions(+), 1 deletion(-)
39 +
40 +diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py
41 +index fc43951da0..c2564188cb 100644
42 +--- a/lib-python/2.7/distutils/command/install.py
43 ++++ b/lib-python/2.7/distutils/command/install.py
44 +@@ -90,6 +90,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 + # The keys to an installation scheme; if any new types of files are to be
58 +@@ -476,7 +483,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/pypy2.7'):
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/pypy-bin/pypy-bin-7.0.0.ebuild b/dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild
76 similarity index 97%
77 rename from dev-python/pypy-bin/pypy-bin-7.0.0.ebuild
78 rename to dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild
79 index 3793bd49daa..eff1516e978 100644
80 --- a/dev-python/pypy-bin/pypy-bin-7.0.0.ebuild
81 +++ b/dev-python/pypy-bin/pypy-bin-7.0.0-r1.ebuild
82 @@ -82,8 +82,12 @@ QA_PREBUILT="
83 usr/lib*/pypy/libpypy-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
89 + sed -e "s^@EPREFIX@^${EPREFIX}^" \
90 + -i lib-python/2.7/distutils/command/install.py || die
91 +
92 # apply CPython stdlib patches
93 pushd lib-python/2.7 > /dev/null || die
94 # TODO: cpy turkish locale patch now fixes C code