]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - python/python-2.7.3-lib64.patch
Merge remote-tracking branch 'stevee/unicode-ucd'
[people/amarx/ipfire-3.x.git] / python / python-2.7.3-lib64.patch
CommitLineData
99e69167
MT
1diff -up Python-2.7.1/Lib/distutils/command/install.py.lib64 Python-2.7.1/Lib/distutils/command/install.py
2--- Python-2.7.1/Lib/distutils/command/install.py.lib64 2010-05-05 15:09:31.000000000 -0400
3+++ Python-2.7.1/Lib/distutils/command/install.py 2010-12-23 15:51:19.422062062 -0500
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',
21diff -up Python-2.7.1/Lib/distutils/sysconfig.py.lib64 Python-2.7.1/Lib/distutils/sysconfig.py
22--- Python-2.7.1/Lib/distutils/sysconfig.py.lib64 2010-11-06 10:16:30.000000000 -0400
23+++ Python-2.7.1/Lib/distutils/sysconfig.py 2010-12-23 15:51:19.423063652 -0500
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:
38diff -up Python-2.7.1/Lib/site.py.lib64 Python-2.7.1/Lib/site.py
39--- Python-2.7.1/Lib/site.py.lib64 2010-10-12 18:53:51.000000000 -0400
40+++ Python-2.7.1/Lib/site.py 2010-12-23 15:51:19.424063606 -0500
41@@ -290,12 +290,16 @@ def getsitepackages():
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
58diff -up Python-2.7.1/Lib/test/test_site.py.lib64 Python-2.7.1/Lib/test/test_site.py
59--- Python-2.7.1/Lib/test/test_site.py.lib64 2010-11-21 08:34:58.000000000 -0500
60+++ Python-2.7.1/Lib/test/test_site.py 2010-12-23 15:55:19.782935931 -0500
9873a6be
AF
61@@ -241,18 +241,22 @@
62 self.assertEqual(dirs[2], wanted)
99e69167 63 elif os.sep == '/':
9873a6be 64 # OS X non-framwework builds, Linux, FreeBSD, etc
99e69167
MT
65- self.assertEqual(len(dirs), 2)
66+ self.assertEquals(len(dirs), 3)
67+ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
68+ 'site-packages')
69+ self.assertEquals(dirs[0], wanted)
70 wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
71 'site-packages')
72- self.assertEqual(dirs[0], wanted)
73+ self.assertEquals(dirs[1], wanted)
74 wanted = os.path.join('xoxo', 'lib', 'site-python')
75- self.assertEqual(dirs[1], wanted)
76+ self.assertEquals(dirs[2], wanted)
77 else:
9873a6be 78 # other platforms
99e69167
MT
79- self.assertEqual(len(dirs), 2)
80- self.assertEqual(dirs[0], 'xoxo')
81- wanted = os.path.join('xoxo', 'lib', 'site-packages')
82- self.assertEqual(dirs[1], wanted)
83+ self.assertEquals(len(dirs), 2)
84+ self.assertEquals(dirs[0], 'xoxo')
85+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
86+ self.assertEquals(dirs[1], wanted)
9873a6be 87+
99e69167 88
9873a6be
AF
89 class PthFile(object):
90 """Helper class for handling testing of .pth files"""
99e69167
MT
91diff -up Python-2.7.1/Makefile.pre.in.lib64 Python-2.7.1/Makefile.pre.in
92--- Python-2.7.1/Makefile.pre.in.lib64 2010-12-23 15:51:19.407063264 -0500
93+++ Python-2.7.1/Makefile.pre.in 2010-12-23 15:51:19.426063917 -0500
94@@ -94,7 +94,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)
103diff -up Python-2.7.1/Modules/getpath.c.lib64 Python-2.7.1/Modules/getpath.c
104--- Python-2.7.1/Modules/getpath.c.lib64 2010-10-07 19:37:08.000000000 -0400
105+++ Python-2.7.1/Modules/getpath.c 2010-12-23 15:51:19.427063291 -0500
106@@ -117,8 +117,8 @@
107 #endif
108
109 #ifndef PYTHONPATH
110-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
111- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
112+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
113+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
114 #endif
115
116 #ifndef LANDMARK
117@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
118 static char exec_prefix[MAXPATHLEN+1];
119 static char progpath[MAXPATHLEN+1];
120 static char *module_search_path = NULL;
121-static char lib_python[] = "lib/python" VERSION;
122+static char lib_python[] = "lib64/python" VERSION;
123
124 static void
125 reduce(char *dir)
126@@ -528,7 +528,7 @@ calculate_path(void)
127 }
128 else
129 strncpy(zip_path, PREFIX, MAXPATHLEN);
130- joinpath(zip_path, "lib/python00.zip");
131+ joinpath(zip_path, "lib64/python00.zip");
132 bufsz = strlen(zip_path); /* Replace "00" with version */
133 zip_path[bufsz - 6] = VERSION[0];
134 zip_path[bufsz - 5] = VERSION[2];
135@@ -538,7 +538,7 @@ calculate_path(void)
136 fprintf(stderr,
137 "Could not find platform dependent libraries <exec_prefix>\n");
138 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
139- joinpath(exec_prefix, "lib/lib-dynload");
140+ joinpath(exec_prefix, "lib64/lib-dynload");
141 }
142 /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
143
144diff -up Python-2.7.1/Modules/Setup.dist.lib64 Python-2.7.1/Modules/Setup.dist
145--- Python-2.7.1/Modules/Setup.dist.lib64 2010-12-23 15:51:19.400104130 -0500
146+++ Python-2.7.1/Modules/Setup.dist 2010-12-23 15:51:19.427063291 -0500
147@@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm
148 # and the subdirectory of PORT where you built it.
149 DBLIBVER=4.7
150 DBINC=/usr/include/db4
151-DBLIB=/usr/lib
152+DBLIB=/usr/lib64
153 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
154
155 # Historical Berkeley DB 1.85
156@@ -459,7 +459,7 @@ cPickle cPickle.c
157 # Andrew Kuchling's zlib module.
158 # This require zlib 1.1.3 (or later).
159 # See http://www.gzip.org/zlib/
160-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
161+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
162
163 # Interface to the Expat XML parser
164 #
165diff -up Python-2.7.1/setup.py.lib64 Python-2.7.1/setup.py
166--- Python-2.7.1/setup.py.lib64 2010-10-31 12:40:21.000000000 -0400
167+++ Python-2.7.1/setup.py 2010-12-23 15:51:19.428064129 -0500
168@@ -347,7 +347,7 @@ class PyBuildExt(build_ext):
169
170 def detect_modules(self):
171 # Ensure that /usr/local is always used
172- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
173+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
174 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
175
176 # Add paths specified in the environment variables LDFLAGS and
177@@ -654,11 +654,11 @@ class PyBuildExt(build_ext):
178 elif curses_library:
179 readline_libs.append(curses_library)
180 elif self.compiler.find_library_file(lib_dirs +
181- ['/usr/lib/termcap'],
182+ ['/usr/lib64/termcap'],
183 'termcap'):
184 readline_libs.append('termcap')
185 exts.append( Extension('readline', ['readline.c'],
186- library_dirs=['/usr/lib/termcap'],
187+ library_dirs=['/usr/lib64/termcap'],
188 extra_link_args=readline_extra_link_args,
189 libraries=readline_libs) )
190 else:
191@@ -692,8 +692,8 @@ class PyBuildExt(build_ext):
192 if krb5_h:
193 ssl_incs += krb5_h
194 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
195- ['/usr/local/ssl/lib',
196- '/usr/contrib/ssl/lib/'
197+ ['/usr/local/ssl/lib64',
198+ '/usr/contrib/ssl/lib64/'
199 ] )
200
201 if (ssl_incs is not None and