public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/
Date: Sat, 16 Feb 2019 15:08:36 +0000 (UTC)	[thread overview]
Message-ID: <1550329704.233a876f75e258f9e72383917a1c2ee40ca55aa6.mgorny@gentoo> (raw)

commit:     233a876f75e258f9e72383917a1c2ee40ca55aa6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 16 14:45:01 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Feb 16 15:08:24 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=233a876f

dev-python/pypy3: Restore Gentoo path patch

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/pypy3/files/7.0.0-gentoo-path.patch     | 52 ++++++++++++++++++++++
 .../{pypy3-7.0.0.ebuild => pypy3-7.0.0-r1.ebuild}  |  4 ++
 dev-python/pypy3/pypy3-9999.ebuild                 |  4 ++
 3 files changed, 60 insertions(+)

diff --git a/dev-python/pypy3/files/7.0.0-gentoo-path.patch b/dev-python/pypy3/files/7.0.0-gentoo-path.patch
new file mode 100644
index 00000000000..17409fa89a4
--- /dev/null
+++ b/dev-python/pypy3/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/pypy3-7.0.0.ebuild b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild
similarity index 97%
rename from dev-python/pypy3/pypy3-7.0.0.ebuild
rename to dev-python/pypy3/pypy3-7.0.0-r1.ebuild
index c318a1f521a..87ce4dbc248 100644
--- a/dev-python/pypy3/pypy3-7.0.0.ebuild
+++ b/dev-python/pypy3/pypy3-7.0.0-r1.ebuild
@@ -84,10 +84,14 @@ pkg_setup() {
 }
 
 src_prepare() {
+	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
 	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

diff --git a/dev-python/pypy3/pypy3-9999.ebuild b/dev-python/pypy3/pypy3-9999.ebuild
index 3b0362d0252..236616d1f28 100644
--- a/dev-python/pypy3/pypy3-9999.ebuild
+++ b/dev-python/pypy3/pypy3-9999.ebuild
@@ -92,10 +92,14 @@ src_unpack() {
 }
 
 src_prepare() {
+	eapply "${FILESDIR}/7.0.0-gentoo-path.patch"
 	eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
 	eapply "${FILESDIR}"/5.9.0-shared-lib.patch	# 517002
 	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


             reply	other threads:[~2019-02-16 15:08 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-16 15:08 Michał Górny [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-03-05 21:06 [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/ Michał Górny
2021-02-09 23:38 Michał Górny
2020-09-17 16:56 Michał Górny
2020-09-11 21:05 Michał Górny
2019-05-24 14:21 Michał Górny
2019-02-14 22:07 Michał Górny
2018-01-05 23:19 Michał Górny
2017-10-15  9:38 Michał Górny
2017-10-09 18:58 Michał Górny
2017-04-25 21:49 Michał Górny
2017-04-25 21:49 Michał Górny
2016-05-05  9:14 Patrice Clement
2016-03-03 10:47 Michał Górny
2016-02-06 22:45 Michał Górny
2015-12-20 21:13 Michał Górny
2015-08-18 16:34 Justin Lecher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1550329704.233a876f75e258f9e72383917a1c2ee40ca55aa6.mgorny@gentoo \
    --to=mgorny@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox