]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - python/python-2.7.3-lib64.patch
kernel: Remove ARM LPAE image
[people/amarx/ipfire-3.x.git] / python / python-2.7.3-lib64.patch
CommitLineData
48d9a6a0
MT
1diff -up Python-2.7.3/Lib/distutils/command/install.py.lib64 Python-2.7.3/Lib/distutils/command/install.py
2--- Python-2.7.3/Lib/distutils/command/install.py.lib64 2012-04-09 19:07:29.000000000 -0400
3+++ Python-2.7.3/Lib/distutils/command/install.py 2013-02-19 13:58:20.446015129 -0500
99e69167
MT
4@@ -42,14 +42,14 @@ else:
5 INSTALL_SCHEMES = {
6 'unix_prefix': {
7 'purelib': '$base/lib/python$py_version_short/site-packages',
8- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
9+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
10 'headers': '$base/include/python$py_version_short/$dist_name',
11 'scripts': '$base/bin',
12 'data' : '$base',
13 },
14 'unix_home': {
15 'purelib': '$base/lib/python',
16- 'platlib': '$base/lib/python',
17+ 'platlib': '$base/lib64/python',
18 'headers': '$base/include/python/$dist_name',
19 'scripts': '$base/bin',
20 'data' : '$base',
48d9a6a0
MT
21diff -up Python-2.7.3/Lib/distutils/sysconfig.py.lib64 Python-2.7.3/Lib/distutils/sysconfig.py
22--- Python-2.7.3/Lib/distutils/sysconfig.py.lib64 2012-04-09 19:07:29.000000000 -0400
23+++ Python-2.7.3/Lib/distutils/sysconfig.py 2013-02-19 13:58:20.446015129 -0500
99e69167
MT
24@@ -114,8 +114,12 @@ 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+ lib = "lib64"
30+ else:
31+ lib = "lib"
32 libpython = os.path.join(prefix,
33- "lib", "python" + get_python_version())
34+ lib, "python" + get_python_version())
35 if standard_lib:
36 return libpython
37 else:
48d9a6a0
MT
38diff -up Python-2.7.3/Lib/site.py.lib64 Python-2.7.3/Lib/site.py
39--- Python-2.7.3/Lib/site.py.lib64 2012-04-09 19:07:31.000000000 -0400
40+++ Python-2.7.3/Lib/site.py 2013-02-19 13:58:20.447015128 -0500
41@@ -300,12 +300,16 @@ def getsitepackages():
99e69167
MT
42 if sys.platform in ('os2emx', 'riscos'):
43 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
44 elif os.sep == '/':
45+ sitepackages.append(os.path.join(prefix, "lib64",
46+ "python" + sys.version[:3],
47+ "site-packages"))
48 sitepackages.append(os.path.join(prefix, "lib",
49 "python" + sys.version[:3],
50 "site-packages"))
51 sitepackages.append(os.path.join(prefix, "lib", "site-python"))
52 else:
53 sitepackages.append(prefix)
54+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
55 sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
56 if sys.platform == "darwin":
57 # for framework builds *only* we add the standard Apple
48d9a6a0
MT
58diff -up Python-2.7.3/Lib/test/test_site.py.lib64 Python-2.7.3/Lib/test/test_site.py
59--- Python-2.7.3/Lib/test/test_site.py.lib64 2012-04-09 19:07:32.000000000 -0400
60+++ Python-2.7.3/Lib/test/test_site.py 2013-02-19 13:58:20.447015128 -0500
61@@ -241,17 +241,20 @@ class HelperFunctionsTests(unittest.Test
9873a6be 62 self.assertEqual(dirs[2], wanted)
99e69167 63 elif os.sep == '/':
9873a6be 64 # OS X non-framwework builds, Linux, FreeBSD, etc
99e69167 65- self.assertEqual(len(dirs), 2)
48d9a6a0
MT
66- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
67+ self.assertEqual(len(dirs), 3)
99e69167 68+ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
99e69167 69 'site-packages')
48d9a6a0
MT
70 self.assertEqual(dirs[0], wanted)
71- wanted = os.path.join('xoxo', 'lib', 'site-python')
72+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
73+ 'site-packages')
74 self.assertEqual(dirs[1], wanted)
75+ wanted = os.path.join('xoxo', 'lib', 'site-python')
76+ self.assertEqual(dirs[2], wanted)
99e69167 77 else:
9873a6be 78 # other platforms
48d9a6a0
MT
79 self.assertEqual(len(dirs), 2)
80 self.assertEqual(dirs[0], 'xoxo')
99e69167 81- wanted = os.path.join('xoxo', 'lib', 'site-packages')
99e69167 82+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
48d9a6a0 83 self.assertEqual(dirs[1], wanted)
99e69167 84
9873a6be 85 class PthFile(object):
48d9a6a0
MT
86diff -up Python-2.7.3/Makefile.pre.in.lib64 Python-2.7.3/Makefile.pre.in
87--- Python-2.7.3/Makefile.pre.in.lib64 2013-02-19 13:58:20.435015131 -0500
88+++ Python-2.7.3/Makefile.pre.in 2013-02-19 13:58:20.447015128 -0500
89@@ -97,7 +97,7 @@ LIBDIR= @libdir@
99e69167
MT
90 MANDIR= @mandir@
91 INCLUDEDIR= @includedir@
92 CONFINCLUDEDIR= $(exec_prefix)/include
93-SCRIPTDIR= $(prefix)/lib
94+SCRIPTDIR= $(prefix)/lib64
95
96 # Detailed destination directories
97 BINLIBDEST= $(LIBDIR)/python$(VERSION)
48d9a6a0
MT
98diff -up Python-2.7.3/Modules/getpath.c.lib64 Python-2.7.3/Modules/getpath.c
99--- Python-2.7.3/Modules/getpath.c.lib64 2012-04-09 19:07:34.000000000 -0400
100+++ Python-2.7.3/Modules/getpath.c 2013-02-19 13:58:20.448015128 -0500
99e69167
MT
101@@ -117,8 +117,8 @@
102 #endif
103
104 #ifndef PYTHONPATH
105-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
106- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
107+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
108+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
109 #endif
110
111 #ifndef LANDMARK
112@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
113 static char exec_prefix[MAXPATHLEN+1];
114 static char progpath[MAXPATHLEN+1];
115 static char *module_search_path = NULL;
116-static char lib_python[] = "lib/python" VERSION;
117+static char lib_python[] = "lib64/python" VERSION;
118
119 static void
120 reduce(char *dir)
121@@ -528,7 +528,7 @@ calculate_path(void)
122 }
123 else
124 strncpy(zip_path, PREFIX, MAXPATHLEN);
125- joinpath(zip_path, "lib/python00.zip");
126+ joinpath(zip_path, "lib64/python00.zip");
127 bufsz = strlen(zip_path); /* Replace "00" with version */
128 zip_path[bufsz - 6] = VERSION[0];
129 zip_path[bufsz - 5] = VERSION[2];
130@@ -538,7 +538,7 @@ calculate_path(void)
131 fprintf(stderr,
132 "Could not find platform dependent libraries <exec_prefix>\n");
133 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
134- joinpath(exec_prefix, "lib/lib-dynload");
135+ joinpath(exec_prefix, "lib64/lib-dynload");
136 }
137 /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
138
48d9a6a0
MT
139diff -up Python-2.7.3/Modules/Setup.dist.lib64 Python-2.7.3/Modules/Setup.dist
140--- Python-2.7.3/Modules/Setup.dist.lib64 2013-02-19 13:58:20.442015131 -0500
141+++ Python-2.7.3/Modules/Setup.dist 2013-02-19 14:02:25.255998391 -0500
99e69167 142@@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm
48d9a6a0 143 # Edit the variables DB and DBLIBVERto point to the db top directory
99e69167 144 # and the subdirectory of PORT where you built it.
48d9a6a0 145 DBINC=/usr/include/libdb
99e69167
MT
146-DBLIB=/usr/lib
147+DBLIB=/usr/lib64
48d9a6a0 148 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
99e69167
MT
149
150 # Historical Berkeley DB 1.85
151@@ -459,7 +459,7 @@ cPickle cPickle.c
152 # Andrew Kuchling's zlib module.
153 # This require zlib 1.1.3 (or later).
154 # See http://www.gzip.org/zlib/
155-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
156+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
157
158 # Interface to the Expat XML parser
159 #
48d9a6a0
MT
160diff -up Python-2.7.3/setup.py.lib64 Python-2.7.3/setup.py
161--- Python-2.7.3/setup.py.lib64 2012-04-09 19:07:36.000000000 -0400
162+++ Python-2.7.3/setup.py 2013-02-19 13:58:20.449015129 -0500
163@@ -369,7 +369,7 @@ class PyBuildExt(build_ext):
99e69167
MT
164
165 def detect_modules(self):
166 # Ensure that /usr/local is always used
167- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
168+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
169 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
48d9a6a0
MT
170 self.add_gcc_paths()
171 self.add_multiarch_paths()
172@@ -677,11 +677,11 @@ class PyBuildExt(build_ext):
99e69167
MT
173 elif curses_library:
174 readline_libs.append(curses_library)
175 elif self.compiler.find_library_file(lib_dirs +
176- ['/usr/lib/termcap'],
177+ ['/usr/lib64/termcap'],
178 'termcap'):
179 readline_libs.append('termcap')
180 exts.append( Extension('readline', ['readline.c'],
181- library_dirs=['/usr/lib/termcap'],
182+ library_dirs=['/usr/lib64/termcap'],
183 extra_link_args=readline_extra_link_args,
184 libraries=readline_libs) )
185 else:
48d9a6a0 186@@ -715,8 +715,8 @@ class PyBuildExt(build_ext):
99e69167
MT
187 if krb5_h:
188 ssl_incs += krb5_h
189 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
190- ['/usr/local/ssl/lib',
191- '/usr/contrib/ssl/lib/'
192+ ['/usr/local/ssl/lib64',
193+ '/usr/contrib/ssl/lib64/'
194 ] )
195
196 if (ssl_incs is not None and