]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - python/python-2.7.12-lib64.patch
gcc: Update to 6.4.0
[people/ms/ipfire-3.x.git] / python / python-2.7.12-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 e8433b4..e8e6b50 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 if sys.platform == "darwin":
60 # for framework builds *only* we add the standard Apple
61 diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
62 index 78c4809..3b9e74d 100644
63 --- a/Lib/test/test_site.py
64 +++ b/Lib/test/test_site.py
65 @@ -246,17 +246,20 @@ class HelperFunctionsTests(unittest.TestCase):
66 self.assertEqual(dirs[2], wanted)
67 elif os.sep == '/':
68 # OS X non-framwework builds, 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 5741a4c..0faa5c5 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 c70a0d6..051fd41 100644
105 --- a/Modules/Setup.dist
106 +++ b/Modules/Setup.dist
107 @@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
108 # Edit the variables DB and DBLIBVERto point to the db top directory
109 # and the subdirectory of PORT where you built it.
110 DBINC=/usr/include/libdb
111 -DBLIB=/usr/lib
112 +DBLIB=/usr/lib64
113 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
114
115 # Historical Berkeley DB 1.85
116 @@ -462,7 +462,7 @@ cPickle cPickle.c
117 # Andrew Kuchling's zlib module.
118 # This require zlib 1.1.3 (or later).
119 # See http://www.gzip.org/zlib/
120 -zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
121 +zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
122
123 # Interface to the Expat XML parser
124 #
125 diff --git a/Modules/getpath.c b/Modules/getpath.c
126 index 428684c..9ef6711 100644
127 --- a/Modules/getpath.c
128 +++ b/Modules/getpath.c
129 @@ -108,7 +108,7 @@ static char prefix[MAXPATHLEN+1];
130 static char exec_prefix[MAXPATHLEN+1];
131 static char progpath[MAXPATHLEN+1];
132 static char *module_search_path = NULL;
133 -static char lib_python[] = "lib/python" VERSION;
134 +static char lib_python[] = "lib64/python" VERSION;
135
136 static void
137 reduce(char *dir)
138 @@ -550,7 +550,7 @@ calculate_path(void)
139 fprintf(stderr,
140 "Could not find platform dependent libraries <exec_prefix>\n");
141 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
142 - joinpath(exec_prefix, "lib/lib-dynload");
143 + joinpath(exec_prefix, "lib64/lib-dynload");
144 }
145 /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
146
147 diff --git a/setup.py b/setup.py
148 index 55c4f5d..19efe82 100644
149 --- a/setup.py
150 +++ b/setup.py
151 @@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
152 def detect_modules(self):
153 # Ensure that /usr/local is always used
154 if not cross_compiling:
155 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
156 + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
157 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
158 if cross_compiling:
159 self.add_gcc_paths()
160 @@ -782,11 +782,11 @@ class PyBuildExt(build_ext):
161 elif curses_library:
162 readline_libs.append(curses_library)
163 elif self.compiler.find_library_file(lib_dirs +
164 - ['/usr/lib/termcap'],
165 + ['/usr/lib64/termcap'],
166 'termcap'):
167 readline_libs.append('termcap')
168 exts.append( Extension('readline', ['readline.c'],
169 - library_dirs=['/usr/lib/termcap'],
170 + library_dirs=['/usr/lib64/termcap'],
171 extra_link_args=readline_extra_link_args,
172 libraries=readline_libs) )
173 else:
174 @@ -821,8 +821,8 @@ class PyBuildExt(build_ext):
175 if krb5_h:
176 ssl_incs += krb5_h
177 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
178 - ['/usr/local/ssl/lib',
179 - '/usr/contrib/ssl/lib/'
180 + ['/usr/local/ssl/lib64',
181 + '/usr/contrib/ssl/lib64/'
182 ] )
183
184 if (ssl_incs is not None and