]> git.ipfire.org Git - ipfire-3.x.git/blob - python/python-2.7.13-lib64.patch
git: Update to 2.23.0
[ipfire-3.x.git] / python / python-2.7.13-lib64.patch
1 diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
2 index b9f1c6c..7b23714 100644
3 --- a/Lib/distutils/command/install.py
4 +++ b/Lib/distutils/command/install.py
5 @@ -42,14 +42,14 @@ else:
6 INSTALL_SCHEMES = {
7 'unix_prefix': {
8 'purelib': '$base/lib/python$py_version_short/site-packages',
9 - 'platlib': '$platbase/lib/python$py_version_short/site-packages',
10 + 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
11 'headers': '$base/include/python$py_version_short/$dist_name',
12 'scripts': '$base/bin',
13 'data' : '$base',
14 },
15 'unix_home': {
16 'purelib': '$base/lib/python',
17 - 'platlib': '$base/lib/python',
18 + 'platlib': '$base/lib64/python',
19 'headers': '$base/include/python/$dist_name',
20 'scripts': '$base/bin',
21 'data' : '$base',
22 diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
23 index 068d1ba..3e7f077 100644
24 --- a/Lib/distutils/sysconfig.py
25 +++ b/Lib/distutils/sysconfig.py
26 @@ -119,8 +119,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
27 prefix = plat_specific and EXEC_PREFIX or PREFIX
28
29 if os.name == "posix":
30 + if plat_specific or standard_lib:
31 + lib = "lib64"
32 + else:
33 + lib = "lib"
34 libpython = os.path.join(prefix,
35 - "lib", "python" + get_python_version())
36 + lib, "python" + get_python_version())
37 if standard_lib:
38 return libpython
39 else:
40 diff --git a/Lib/site.py b/Lib/site.py
41 index c360802..868b7cb 100644
42 --- a/Lib/site.py
43 +++ b/Lib/site.py
44 @@ -288,12 +288,16 @@ def getsitepackages():
45 if sys.platform in ('os2emx', 'riscos'):
46 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
47 elif os.sep == '/':
48 + sitepackages.append(os.path.join(prefix, "lib64",
49 + "python" + sys.version[:3],
50 + "site-packages"))
51 sitepackages.append(os.path.join(prefix, "lib",
52 "python" + sys.version[:3],
53 "site-packages"))
54 sitepackages.append(os.path.join(prefix, "lib", "site-python"))
55 else:
56 sitepackages.append(prefix)
57 + sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
58 sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
59 return sitepackages
60
61 diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
62 index d9a9324..e411e5c 100644
63 --- a/Lib/test/test_site.py
64 +++ b/Lib/test/test_site.py
65 @@ -235,17 +235,20 @@ class HelperFunctionsTests(unittest.TestCase):
66 self.assertEqual(dirs[0], wanted)
67 elif os.sep == '/':
68 # OS X, Linux, FreeBSD, etc
69 - self.assertEqual(len(dirs), 2)
70 - wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
71 + self.assertEqual(len(dirs), 3)
72 + wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
73 'site-packages')
74 self.assertEqual(dirs[0], wanted)
75 - wanted = os.path.join('xoxo', 'lib', 'site-python')
76 + wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
77 + 'site-packages')
78 self.assertEqual(dirs[1], wanted)
79 + wanted = os.path.join('xoxo', 'lib', 'site-python')
80 + self.assertEqual(dirs[2], wanted)
81 else:
82 # other platforms
83 self.assertEqual(len(dirs), 2)
84 self.assertEqual(dirs[0], 'xoxo')
85 - wanted = os.path.join('xoxo', 'lib', 'site-packages')
86 + wanted = os.path.join('xoxo', 'lib64', 'site-packages')
87 self.assertEqual(dirs[1], wanted)
88
89 class PthFile(object):
90 diff --git a/Makefile.pre.in b/Makefile.pre.in
91 index adae76b..ecb27f3 100644
92 --- a/Makefile.pre.in
93 +++ b/Makefile.pre.in
94 @@ -111,7 +111,7 @@ LIBDIR= @libdir@
95 MANDIR= @mandir@
96 INCLUDEDIR= @includedir@
97 CONFINCLUDEDIR= $(exec_prefix)/include
98 -SCRIPTDIR= $(prefix)/lib
99 +SCRIPTDIR= $(prefix)/lib64
100
101 # Detailed destination directories
102 BINLIBDEST= $(LIBDIR)/python$(VERSION)
103 diff --git a/Modules/Setup.dist b/Modules/Setup.dist
104 index fbfa1c1..138fb33 100644
105 --- a/Modules/Setup.dist
106 +++ b/Modules/Setup.dist
107 @@ -231,7 +231,7 @@
108 # Some more UNIX dependent modules -- off by default, since these
109 # are not supported by all UNIX systems:
110
111 -#nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
112 +#nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib64/nsl
113 termios termios.c # Steen Lumholt's termios module
114 resource resource.c # Jeremy Hylton's rlimit interface
115
116 @@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
117 # Edit the variables DB and DBLIBVERto point to the db top directory
118 # and the subdirectory of PORT where you built it.
119 DBINC=/usr/include/libdb
120 -DBLIB=/usr/lib
121 +DBLIB=/usr/lib64
122 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
123
124 # Historical Berkeley DB 1.85
125 @@ -462,7 +462,7 @@ cPickle cPickle.c
126 # Andrew Kuchling's zlib module.
127 # This require zlib 1.1.3 (or later).
128 # See http://www.gzip.org/zlib/
129 -zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
130 +zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
131
132 # Interface to the Expat XML parser
133 #
134 diff --git a/Modules/getpath.c b/Modules/getpath.c
135 index fd33a01..c5c86fd 100644
136 --- a/Modules/getpath.c
137 +++ b/Modules/getpath.c
138 @@ -108,7 +108,7 @@ static char prefix[MAXPATHLEN+1];
139 static char exec_prefix[MAXPATHLEN+1];
140 static char progpath[MAXPATHLEN+1];
141 static char *module_search_path = NULL;
142 -static char lib_python[] = "lib/python" VERSION;
143 +static char lib_python[] = "lib64/python" VERSION;
144
145 static void
146 reduce(char *dir)
147 @@ -548,7 +548,7 @@ calculate_path(void)
148 fprintf(stderr,
149 "Could not find platform dependent libraries <exec_prefix>\n");
150 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
151 - joinpath(exec_prefix, "lib/lib-dynload");
152 + joinpath(exec_prefix, "lib64/lib-dynload");
153 }
154 /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
155
156 diff --git a/setup.py b/setup.py
157 index 99ac359..859b6c4 100644
158 --- a/setup.py
159 +++ b/setup.py
160 @@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
161 def detect_modules(self):
162 # Ensure that /usr/local is always used
163 if not cross_compiling:
164 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
165 + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
166 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
167 if cross_compiling:
168 self.add_gcc_paths()
169 @@ -782,11 +782,11 @@ class PyBuildExt(build_ext):
170 elif curses_library:
171 readline_libs.append(curses_library)
172 elif self.compiler.find_library_file(lib_dirs +
173 - ['/usr/lib/termcap'],
174 + ['/usr/lib64/termcap'],
175 'termcap'):
176 readline_libs.append('termcap')
177 exts.append( Extension('readline', ['readline.c'],
178 - library_dirs=['/usr/lib/termcap'],
179 + library_dirs=['/usr/lib64/termcap'],
180 extra_link_args=readline_extra_link_args,
181 libraries=readline_libs) )
182 else:
183 @@ -821,8 +821,8 @@ class PyBuildExt(build_ext):
184 if krb5_h:
185 ssl_incs += krb5_h
186 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
187 - ['/usr/local/ssl/lib',
188 - '/usr/contrib/ssl/lib/'
189 + ['/usr/local/ssl/lib64',
190 + '/usr/contrib/ssl/lib64/'
191 ] )
192
193 if (ssl_incs is not None and