summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2015-11-27 17:13:31 +0100
committerMichał Górny <mgorny@gentoo.org>2015-11-27 20:49:29 +0100
commitac802704f1c23ef89035b5a817ae4314ea1b5c0c (patch)
tree573b3b7ffc1075a427b5dc5d872da591612174c3 /dev-python/pypy/files
parentdev-libs/libassuan: Version bump to 2.4.1 (diff)
downloadgentoo-ac802704f1c23ef89035b5a817ae4314ea1b5c0c.tar.gz
gentoo-ac802704f1c23ef89035b5a817ae4314ea1b5c0c.tar.bz2
gentoo-ac802704f1c23ef89035b5a817ae4314ea1b5c0c.zip
dev-python/pypy: Apply full Gentoo path set, only for Gentoo sys.prefix
Override all default distutils.command.install paths for Gentoo rather than just scriptdir. However, do that only when install_base equals the default prefix in which PyPy is installed system-wide. This fixes both issues resulting from lack of prefix override (like installing data files in /usr/lib*/pypy), and from overeager prefix overrides (like virtualenv installing scripts in /usr/bin). Fixes: https://bugs.gentoo.org/462306 Fixes: https://bugs.gentoo.org/465546
Diffstat (limited to 'dev-python/pypy/files')
-rw-r--r--dev-python/pypy/files/1.9-scripts-location.patch11
-rw-r--r--dev-python/pypy/files/4.0.0-gentoo-path.patch50
2 files changed, 50 insertions, 11 deletions
diff --git a/dev-python/pypy/files/1.9-scripts-location.patch b/dev-python/pypy/files/1.9-scripts-location.patch
deleted file mode 100644
index 74539088297b..000000000000
--- a/dev-python/pypy/files/1.9-scripts-location.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/lib-python/2.7/distutils/command/install.py
-+++ b/lib-python/2.7/distutils/command/install.py
-@@ -87,7 +87,7 @@
- 'purelib': '$base/site-packages',
- 'platlib': '$base/site-packages',
- 'headers': '$base/include',
-- 'scripts': '$base/bin',
-+ 'scripts': '/usr/bin',
- 'data' : '$base',
- },
- }
diff --git a/dev-python/pypy/files/4.0.0-gentoo-path.patch b/dev-python/pypy/files/4.0.0-gentoo-path.patch
new file mode 100644
index 000000000000..4d394f9340df
--- /dev/null
+++ b/dev-python/pypy/files/4.0.0-gentoo-path.patch
@@ -0,0 +1,50 @@
+From 165e05bbdc93e54411217c0198d0a5cbb9de4e33 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 27 Nov 2015 17:02:42 +0100
+Subject: [PATCH] Gentoo: override paths for system-wide install based on
+ sys.prefix
+
+Override all default distutils install paths to ones suitable for
+system-wide install when sys.prefix indicates we're running the Gentoo
+system-wide install of PyPy with no prefix overrides (e.g. virtualenv).
+
+Fixes: https://bugs.gentoo.org/462306
+Fixes: https://bugs.gentoo.org/465546
+---
+ lib-python/2.7/distutils/command/install.py | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py
+index fc43951..fed5218 100644
+--- a/lib-python/2.7/distutils/command/install.py
++++ b/lib-python/2.7/distutils/command/install.py
+@@ -90,6 +90,13 @@ INSTALL_SCHEMES = {
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
++ 'gentoo': {
++ 'purelib': '$base/site-packages',
++ 'platlib': '$base/site-packages',
++ 'headers': '$base/include',
++ 'scripts': '@EPREFIX@/usr/bin',
++ 'data' : '@EPREFIX@/usr',
++ },
+ }
+
+ # The keys to an installation scheme; if any new types of files are to be
+@@ -476,7 +483,11 @@ class install (Command):
+ # it's the caller's problem if they supply a bad name!
+ if (hasattr(sys, 'pypy_version_info') and
+ not name.endswith(('_user', '_home'))):
+- name = 'pypy'
++ if self.install_base == os.path.normpath('@EPREFIX@/usr/@libdir@/pypy'):
++ # override paths for system-wide install
++ name = 'gentoo'
++ else:
++ name = 'pypy'
+ scheme = INSTALL_SCHEMES[name]
+ for key in SCHEME_KEYS:
+ attrname = 'install_' + key
+--
+2.6.3
+