summaryrefslogtreecommitdiff
path: root/dev-python/pypy/files/7.3.1-gentoo-path.patch
blob: dd2c635055dd1e0557bcefea2b774e2af37a8774 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 6d439c6718625bb7dce32b0afdc6a3d5168a21e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Sat, 11 Apr 2020 07:01:27 +0200
Subject: [PATCH] Support Gentoo install scheme

---
 lib-python/2.7/distutils/command/install.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib-python/2.7/distutils/command/install.py b/lib-python/2.7/distutils/command/install.py
index 6fe62be..a4e9f0d 100644
--- a/lib-python/2.7/distutils/command/install.py
+++ b/lib-python/2.7/distutils/command/install.py
@@ -97,6 +97,13 @@ INSTALL_SCHEMES = {
         'scripts': '$base/Scripts',
         '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
@@ -483,7 +490,10 @@ 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'))):
-            if os.name == 'nt':
+            if self.install_base == os.path.normpath('@EPREFIX@/usr/lib/pypy2.7'):
+                # override paths for system-wide install
+                name = 'gentoo'
+            elif os.name == 'nt':
                 name = 'pypy_nt'
             else:
                 name = 'pypy'
-- 
2.26.0