]>
Commit | Line | Data |
---|---|---|
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-19 13:31:44.000000000 +0100 | |
3 | +++ Python-3.9.2/Lib/distutils/command/install.py 2021-02-25 18:40:00.705652346 +0100 | |
4 | @@ -29,14 +29,14 @@ WINDOWS_SCHEME = { | |
5 | ||
6 | INSTALL_SCHEMES = { | |
7 | 'unix_prefix': { | |
8 | - 'purelib': '$base/lib/python$py_version_short/site-packages', | |
9 | + 'purelib': '$base/$platlibdir/python$py_version_short/site-packages', | |
10 | 'platlib': '$platbase/$platlibdir/python$py_version_short/site-packages', | |
11 | 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', | |
12 | 'scripts': '$base/bin', | |
13 | 'data' : '$base', | |
14 | }, | |
15 | 'unix_home': { | |
16 | - 'purelib': '$base/lib/python', | |
17 | + 'purelib': '$base/$platlibdir/python', | |
18 | 'platlib': '$base/$platlibdir/python', | |
19 | 'headers': '$base/include/python/$dist_name', | |
20 | 'scripts': '$base/bin', | |
21 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py | |
22 | --- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 | |
23 | +++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 | |
24 | @@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan | |
25 | prefix = plat_specific and EXEC_PREFIX or PREFIX | |
26 | ||
27 | if os.name == "posix": | |
28 | - if plat_specific or standard_lib: | |
29 | + if plat_specific or standard_lib or prefix != "/usr": | |
30 | # Platform-specific modules (any module from a non-pure-Python | |
31 | # module distribution) or standard Python library modules. | |
32 | libdir = sys.platlibdir | |
33 | else: | |
34 | # Pure Python | |
35 | - libdir = "lib" | |
36 | + libdir = "share" | |
37 | libpython = os.path.join(prefix, libdir, | |
38 | "python" + get_python_version()) | |
39 | if standard_lib: | |
40 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Python-3.9.2/Lib/distutils/tests/test_install.py | |
41 | --- Python-3.9.2.org/Lib/distutils/tests/test_install.py 2021-02-19 13:31:44.000000000 +0100 | |
42 | +++ Python-3.9.2/Lib/distutils/tests/test_install.py 2021-02-25 18:40:00.705652346 +0100 | |
43 | @@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan | |
44 | expected = os.path.normpath(expected) | |
45 | self.assertEqual(got, expected) | |
46 | ||
47 | - libdir = os.path.join(destination, "lib", "python") | |
48 | + libdir = os.path.join(destination, sys.platlibdir, "python") | |
49 | check_path(cmd.install_lib, libdir) | |
50 | platlibdir = os.path.join(destination, sys.platlibdir, "python") | |
51 | check_path(cmd.install_platlib, platlibdir) | |
52 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py | |
53 | --- Python-3.9.2.org/Lib/site.py 2021-02-19 13:31:44.000000000 +0100 | |
54 | +++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100 | |
55 | @@ -344,6 +344,8 @@ def getsitepackages(prefixes=None): | |
56 | "python%d.%d" % sys.version_info[:2], | |
57 | "site-packages") | |
58 | sitepackages.append(path) | |
59 | + sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python")) | |
60 | + sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages")) | |
61 | else: | |
62 | sitepackages.append(prefix) | |
63 | ||
64 | diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py | |
65 | --- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100 | |
66 | +++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100 | |
67 | @@ -27,7 +27,7 @@ _INSTALL_SCHEMES = { | |
68 | 'posix_prefix': { | |
69 | 'stdlib': '{installed_base}/{platlibdir}/python{py_version_short}', | |
70 | 'platstdlib': '{platbase}/{platlibdir}/python{py_version_short}', | |
71 | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', | |
72 | + 'purelib': '{base}/{platlibdir}/python{py_version_short}/site-packages', | |
73 | 'platlib': '{platbase}/{platlibdir}/python{py_version_short}/site-packages', | |
74 | 'include': | |
75 | '{installed_base}/include/python{py_version_short}{abiflags}', | |
76 | @@ -37,10 +37,10 @@ _INSTALL_SCHEMES = { | |
77 | 'data': '{base}', | |
78 | }, | |
79 | 'posix_home': { | |
80 | - 'stdlib': '{installed_base}/lib/python', | |
81 | - 'platstdlib': '{base}/lib/python', | |
82 | - 'purelib': '{base}/lib/python', | |
83 | - 'platlib': '{base}/lib/python', | |
84 | + 'stdlib': '{installed_base}/{platlibdir}/python', | |
85 | + 'platstdlib': '{base}/{platlibdir}/python', | |
86 | + 'purelib': '{base}/{platlibdir}/python', | |
87 | + 'platlib': '{base}/{platlibdir}/python', | |
88 | 'include': '{installed_base}/include/python', | |
89 | 'platinclude': '{installed_base}/include/python', | |
90 | 'scripts': '{base}/bin', | |
91 | @@ -69,7 +69,7 @@ _INSTALL_SCHEMES = { | |
92 | 'posix_user': { | |
93 | 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}', | |
94 | 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}', | |
95 | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | |
96 | + 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', | |
97 | 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages', | |
98 | 'include': '{userbase}/include/python{py_version_short}', | |
99 | 'scripts': '{userbase}/bin', | |
100 | @@ -490,7 +490,11 @@ def get_config_h_filename(): | |
101 | else: | |
102 | inc_dir = _sys_home or _PROJECT_BASE | |
103 | else: | |
104 | - inc_dir = get_path('platinclude') | |
105 | + if hasattr(sys, 'abiflags'): | |
106 | + config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags) | |
107 | + else: | |
108 | + config_dir_name = 'config' | |
109 | + inc_dir = os.path.join(get_path('stdlib'), config_dir_name) | |
110 | return os.path.join(inc_dir, 'pyconfig.h') | |
111 | ||
112 | ||
113 | diff -urNp -x '*.orig' Python-3.9.2.org/Makefile.pre.in Python-3.9.2/Makefile.pre.in | |
114 | --- Python-3.9.2.org/Makefile.pre.in 2021-02-19 13:31:44.000000000 +0100 | |
115 | +++ Python-3.9.2/Makefile.pre.in 2021-02-25 18:40:00.705652346 +0100 | |
116 | @@ -1634,9 +1634,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf | |
117 | @if test -d $(LIBRARY); then :; else \ | |
118 | if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ | |
119 | if test "$(SHLIB_SUFFIX)" = .dll; then \ | |
120 | - $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ | |
121 | + $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \ | |
122 | else \ | |
123 | - $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ | |
124 | + $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \ | |
125 | fi; \ | |
126 | else \ | |
127 | echo Skip install of $(LIBRARY) - use make frameworkinstall; \ | |
128 | diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py | |
129 | --- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100 | |
130 | +++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100 | |
131 | @@ -750,7 +750,7 @@ class PyBuildExt(build_ext): | |
132 | add_dir_to_list(self.compiler.include_dirs, | |
133 | sysconfig.get_config_var("INCLUDEDIR")) | |
134 | ||
135 | - system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib'] | |
136 | + system_lib_dirs = ['/' + sys.platlibdir, '/usr/' + sys.platlibdir] | |
137 | system_include_dirs = ['/usr/include'] | |
138 | # lib_dirs and inc_dirs are used to search for files; | |
139 | # if a file is found in one of those directories, it can | |
140 | @@ -1039,11 +1039,11 @@ class PyBuildExt(build_ext): | |
141 | elif curses_library: | |
142 | readline_libs.append(curses_library) | |
143 | elif self.compiler.find_library_file(self.lib_dirs + | |
144 | - ['/usr/lib/termcap'], | |
145 | + ['/usr/' + sys.platlibdir + '/termcap'], | |
146 | 'termcap'): | |
147 | readline_libs.append('termcap') | |
148 | self.add(Extension('readline', ['readline.c'], | |
149 | - library_dirs=['/usr/lib/termcap'], | |
150 | + library_dirs=['/usr/' + sys.platlibdir + '/termcap'], | |
151 | extra_link_args=readline_extra_link_args, | |
152 | libraries=readline_libs)) | |
153 | else: |