diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-02-16 15:46:11 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-02-16 16:08:25 +0100 |
commit | f0f07e9b5bfd4fedaf6b08342275e8f0e80b5df7 (patch) | |
tree | a84883df118a62110ecd2db5ee9a4de86b1f55e0 /dev-python/pypy3-bin | |
parent | dev-python/pypy3: Restore Gentoo path patch (diff) | |
download | gentoo-f0f07e9b5bfd4fedaf6b08342275e8f0e80b5df7.tar.gz gentoo-f0f07e9b5bfd4fedaf6b08342275e8f0e80b5df7.tar.bz2 gentoo-f0f07e9b5bfd4fedaf6b08342275e8f0e80b5df7.zip |
dev-python/pypy3-bin: Restore Gentoo path patch
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/pypy3-bin')
-rw-r--r-- | dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch | 52 | ||||
-rw-r--r-- | dev-python/pypy3-bin/pypy3-bin-7.0.0-r1.ebuild (renamed from dev-python/pypy3-bin/pypy3-bin-7.0.0.ebuild) | 4 |
2 files changed, 56 insertions, 0 deletions
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 new file mode 100644 index 000000000000..17409fa89a42 --- /dev/null +++ b/dev-python/pypy3-bin/files/7.0.0-gentoo-path.patch @@ -0,0 +1,52 @@ +From 44c16c344f137cc91a145294c4124174fc25ad16 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 + +[updated for 7.0.0] +--- + lib-python/3/distutils/command/install.py | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/lib-python/3/distutils/command/install.py b/lib-python/3/distutils/command/install.py +index 77a1827d4b..255603967f 100644 +--- a/lib-python/3/distutils/command/install.py ++++ b/lib-python/3/distutils/command/install.py +@@ -50,6 +50,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', ++ }, + } + + # user site schemes +@@ -461,7 +468,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/lib/pypy3.5'): ++ # override paths for system-wide install ++ name = 'gentoo' ++ else: ++ name = 'pypy' + scheme = INSTALL_SCHEMES[name] + for key in SCHEME_KEYS: + attrname = 'install_' + key +-- +2.21.0.rc1 + 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 index 820cb2321a3a..94c2fed28bf5 100644 --- a/dev-python/pypy3-bin/pypy3-bin-7.0.0.ebuild +++ b/dev-python/pypy3-bin/pypy3-bin-7.0.0-r1.ebuild @@ -65,9 +65,13 @@ QA_PREBUILT=" usr/lib*/pypy3/libpypy3-c.so" src_prepare() { + eapply "${FILESDIR}/7.0.0-gentoo-path.patch" eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" eapply "${FILESDIR}"/7.0.0_all_distutils_cxx.patch + sed -e "s^@EPREFIX@^${EPREFIX}^" \ + -i lib-python/3/distutils/command/install.py || die + # apply CPython stdlib patches pushd lib-python/3 > /dev/null || die eapply "${FILESDIR}"/python-3.5-distutils-OO-build.patch |