]>
Commit | Line | Data |
---|---|---|
b10abc3a AM |
1 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/command/install.py Python-3.9.2/Lib/distutils/command/install.py |
2 | --- Python-3.9.2.org/Lib/distutils/command/install.py 2021-02-25 18:41:13.921266287 +0100 | |
3 | +++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:41:15.634652993 +0100 | |
4 | @@ -9,6 +9,7 @@ from distutils import log | |
4212268e JK |
5 | from distutils.core import Command |
6 | from distutils.debug import DEBUG | |
7 | from distutils.sysconfig import get_config_vars | |
8 | +from distutils.sysconfig import PREFIX, EXEC_PREFIX | |
9 | from distutils.errors import DistutilsPlatformError | |
10 | from distutils.file_util import write_file | |
11 | from distutils.util import convert_path, subst_vars, change_root | |
b10abc3a | 12 | @@ -419,8 +420,8 @@ class install(Command): |
4212268e JK |
13 | raise DistutilsOptionError( |
14 | "must not supply exec-prefix without prefix") | |
15 | ||
16 | - self.prefix = os.path.normpath(sys.prefix) | |
17 | - self.exec_prefix = os.path.normpath(sys.exec_prefix) | |
18 | + self.prefix = PREFIX | |
19 | + self.exec_prefix = EXEC_PREFIX | |
20 | ||
21 | else: | |
22 | if self.exec_prefix is None: | |
b10abc3a AM |
23 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py |
24 | --- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-25 18:41:13.927933162 +0100 | |
25 | +++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:41:15.634652993 +0100 | |
26 | @@ -19,6 +19,10 @@ from .errors import DistutilsPlatformErr | |
4212268e | 27 | # These are needed in a couple of spots, so just compute them once. |
595077ba JK |
28 | PREFIX = os.path.normpath(sys.prefix) |
29 | EXEC_PREFIX = os.path.normpath(sys.exec_prefix) | |
30 | +if PREFIX == "/usr": | |
31 | + PREFIX = "/usr/local" | |
32 | +if EXEC_PREFIX == "/usr": | |
33 | + EXEC_PREFIX = "/usr/local" | |
4212268e JK |
34 | BASE_PREFIX = os.path.normpath(sys.base_prefix) |
35 | BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) | |
36 | ||
b10abc3a AM |
37 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py |
38 | --- Python-3.9.2.org/Lib/site.py 2021-02-25 18:41:13.924599724 +0100 | |
39 | +++ Python-3.9.2/Lib/site.py 2021-02-25 18:41:15.634652993 +0100 | |
40 | @@ -76,7 +76,7 @@ import _sitebuiltins | |
41 | import io | |
4212268e JK |
42 | |
43 | # Prefixes for site-packages; add additional prefixes like /usr/local here | |
44 | -PREFIXES = [sys.prefix, sys.exec_prefix] | |
45 | +PREFIXES = ["/usr/local", sys.prefix, sys.exec_prefix] | |
46 | # Enable per user site-packages directory | |
47 | # set it to False to disable the feature or True to force the feature | |
48 | ENABLE_USER_SITE = None |