]> git.pld-linux.org Git - packages/python3.git/blame - python3-multilib.patch
Partial update to 3.10.0.
[packages/python3.git] / python3-multilib.patch
CommitLineData
b10abc3a
AM
1diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/sysconfig.py Python-3.9.2/Lib/distutils/sysconfig.py
2--- Python-3.9.2.org/Lib/distutils/sysconfig.py 2021-02-19 13:31:44.000000000 +0100
3+++ Python-3.9.2/Lib/distutils/sysconfig.py 2021-02-25 18:40:00.705652346 +0100
520f15b4 4@@ -145,13 +145,13 @@ def get_python_lib(plat_specific=0, stan
ea93f05f 5 prefix = plat_specific and EXEC_PREFIX or PREFIX
e684db95
AM
6
7 if os.name == "posix":
520f15b4 8- if plat_specific or standard_lib:
49e8feb6 9+ if plat_specific or standard_lib or prefix != "/usr":
520f15b4
AM
10 # Platform-specific modules (any module from a non-pure-Python
11 # module distribution) or standard Python library modules.
12 libdir = sys.platlibdir
e684db95 13 else:
520f15b4
AM
14 # Pure Python
15- libdir = "lib"
16+ libdir = "share"
17 libpython = os.path.join(prefix, libdir,
18 "python" + get_python_version())
19 if standard_lib:
b10abc3a
AM
20diff -urNp -x '*.orig' Python-3.9.2.org/Lib/distutils/tests/test_install.py Python-3.9.2/Lib/distutils/tests/test_install.py
21--- Python-3.9.2.org/Lib/distutils/tests/test_install.py 2021-02-19 13:31:44.000000000 +0100
22+++ Python-3.9.2/Lib/distutils/tests/test_install.py 2021-02-25 18:40:00.705652346 +0100
520f15b4 23@@ -56,7 +56,7 @@ class InstallTestCase(support.TempdirMan
ea93f05f 24 expected = os.path.normpath(expected)
e684db95
AM
25 self.assertEqual(got, expected)
26
ea93f05f 27- libdir = os.path.join(destination, "lib", "python")
520f15b4 28+ libdir = os.path.join(destination, sys.platlibdir, "python")
e684db95 29 check_path(cmd.install_lib, libdir)
b10abc3a
AM
30 platlibdir = os.path.join(destination, sys.platlibdir, "python")
31 check_path(cmd.install_platlib, platlibdir)
32diff -urNp -x '*.orig' Python-3.9.2.org/Lib/site.py Python-3.9.2/Lib/site.py
33--- Python-3.9.2.org/Lib/site.py 2021-02-19 13:31:44.000000000 +0100
34+++ Python-3.9.2/Lib/site.py 2021-02-25 18:40:00.705652346 +0100
520f15b4
AM
35@@ -344,6 +344,8 @@ def getsitepackages(prefixes=None):
36 "python%d.%d" % sys.version_info[:2],
37 "site-packages")
38 sitepackages.append(path)
39+ sitepackages.append(os.path.join(prefix, sys.platlibdir, "site-python"))
ea93f05f 40+ sitepackages.append(os.path.join(prefix, "share", "python" + sys.version[:3], "site-packages"))
04df829f 41 else:
e3852288 42 sitepackages.append(prefix)
75257062 43
b10abc3a
AM
44diff -urNp -x '*.orig' Python-3.9.2.org/Lib/sysconfig.py Python-3.9.2/Lib/sysconfig.py
45--- Python-3.9.2.org/Lib/sysconfig.py 2021-02-19 13:31:44.000000000 +0100
46+++ Python-3.9.2/Lib/sysconfig.py 2021-02-25 18:40:00.705652346 +0100
b10abc3a 47@@ -37,10 +37,10 @@ _INSTALL_SCHEMES = {
75257062 48 'data': '{base}',
49 },
50 'posix_home': {
b88f500a 51- 'stdlib': '{installed_base}/lib/python',
75257062 52- 'platstdlib': '{base}/lib/python',
ea93f05f
JK
53- 'purelib': '{base}/lib/python',
54- 'platlib': '{base}/lib/python',
520f15b4
AM
55+ 'stdlib': '{installed_base}/{platlibdir}/python',
56+ 'platstdlib': '{base}/{platlibdir}/python',
57+ 'purelib': '{base}/{platlibdir}/python',
58+ 'platlib': '{base}/{platlibdir}/python',
b88f500a
AM
59 'include': '{installed_base}/include/python',
60 'platinclude': '{installed_base}/include/python',
75257062 61 'scripts': '{base}/bin',
8d01f992
AM
62@@ -100,8 +100,8 @@ if _HAS_USER_BASE:
63 'posix_user': {
64 'stdlib': '{userbase}/{platlibdir}/python{py_version_short}',
65 'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}',
66- 'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
67- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
68+ 'purelib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
69+ 'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
70 'include': '{userbase}/include/python{py_version_short}',
71 'scripts': '{userbase}/bin',
72 'data': '{userbase}',
b10abc3a 73@@ -490,7 +490,11 @@ def get_config_h_filename():
a033b415
JK
74 else:
75 inc_dir = _sys_home or _PROJECT_BASE
76 else:
77- inc_dir = get_path('platinclude')
78+ if hasattr(sys, 'abiflags'):
79+ config_dir_name = 'config-%s%s' % (_PY_VERSION_SHORT, sys.abiflags)
80+ else:
81+ config_dir_name = 'config'
82+ inc_dir = os.path.join(get_path('stdlib'), config_dir_name)
83 return os.path.join(inc_dir, 'pyconfig.h')
84
8d01f992
AM
85
86--- Python-3.10.0/Makefile.pre.in~ 2021-10-04 19:40:46.000000000 +0200
87+++ Python-3.10.0/Makefile.pre.in 2021-10-20 22:21:30.573156183 +0200
88@@ -1707,9 +1707,9 @@ libainstall: @DEF_MAKE_RULE@ python-conf
89 if test -d $(LIBRARY); then :; else \
90 if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
91 if test "$(SHLIB_SUFFIX)" = .dll; then \
92- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
93+ $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBDIR) ; \
94 else \
95- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
96+ $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBDIR)/$(LIBRARY) ; \
97 fi; \
ea93f05f 98 else \
8d01f992 99 echo Skip install of $(LIBRARY) - use make frameworkinstall; \
b10abc3a
AM
100diff -urNp -x '*.orig' Python-3.9.2.org/setup.py Python-3.9.2/setup.py
101--- Python-3.9.2.org/setup.py 2021-02-19 13:31:44.000000000 +0100
102+++ Python-3.9.2/setup.py 2021-02-25 18:40:00.708985783 +0100
103@@ -750,7 +750,7 @@ class PyBuildExt(build_ext):
380ee8da
AM
104 add_dir_to_list(self.compiler.include_dirs,
105 sysconfig.get_config_var("INCLUDEDIR"))
106
107- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
520f15b4 108+ system_lib_dirs = ['/' + sys.platlibdir, '/usr/' + sys.platlibdir]
380ee8da
AM
109 system_include_dirs = ['/usr/include']
110 # lib_dirs and inc_dirs are used to search for files;
111 # if a file is found in one of those directories, it can
b10abc3a 112@@ -1039,11 +1039,11 @@ class PyBuildExt(build_ext):
e3852288
JB
113 elif curses_library:
114 readline_libs.append(curses_library)
3e35963a 115 elif self.compiler.find_library_file(self.lib_dirs +
e3852288 116- ['/usr/lib/termcap'],
520f15b4 117+ ['/usr/' + sys.platlibdir + '/termcap'],
e3852288 118 'termcap'):
e684db95 119 readline_libs.append('termcap')
3e35963a
AM
120 self.add(Extension('readline', ['readline.c'],
121- library_dirs=['/usr/lib/termcap'],
520f15b4 122+ library_dirs=['/usr/' + sys.platlibdir + '/termcap'],
3e35963a
AM
123 extra_link_args=readline_extra_link_args,
124 libraries=readline_libs))
e3852288 125 else:
This page took 0.056291 seconds and 4 git commands to generate.