]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blame - python/python-2.7.1-lib64.patch
libsepol: Update to 2.1.4.
[people/amarx/ipfire-3.x.git] / python / python-2.7.1-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
61@@ -169,17 +169,20 @@ class HelperFunctionsTests(unittest.Test
62 wanted = os.path.join('xoxo', 'Lib', 'site-packages')
63 self.assertEqual(dirs[0], wanted)
64 elif os.sep == '/':
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:
78- self.assertEqual(len(dirs), 2)
79- self.assertEqual(dirs[0], 'xoxo')
80- wanted = os.path.join('xoxo', 'lib', 'site-packages')
81- self.assertEqual(dirs[1], wanted)
82+ self.assertEquals(len(dirs), 2)
83+ self.assertEquals(dirs[0], 'xoxo')
84+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
85+ self.assertEquals(dirs[1], wanted)
86
87 # let's try the specific Apple location
88 if (sys.platform == "darwin" and
89diff -up Python-2.7.1/Makefile.pre.in.lib64 Python-2.7.1/Makefile.pre.in
90--- Python-2.7.1/Makefile.pre.in.lib64 2010-12-23 15:51:19.407063264 -0500
91+++ Python-2.7.1/Makefile.pre.in 2010-12-23 15:51:19.426063917 -0500
92@@ -94,7 +94,7 @@ LIBDIR= @libdir@
93 MANDIR= @mandir@
94 INCLUDEDIR= @includedir@
95 CONFINCLUDEDIR= $(exec_prefix)/include
96-SCRIPTDIR= $(prefix)/lib
97+SCRIPTDIR= $(prefix)/lib64
98
99 # Detailed destination directories
100 BINLIBDEST= $(LIBDIR)/python$(VERSION)
101diff -up Python-2.7.1/Modules/getpath.c.lib64 Python-2.7.1/Modules/getpath.c
102--- Python-2.7.1/Modules/getpath.c.lib64 2010-10-07 19:37:08.000000000 -0400
103+++ Python-2.7.1/Modules/getpath.c 2010-12-23 15:51:19.427063291 -0500
104@@ -117,8 +117,8 @@
105 #endif
106
107 #ifndef PYTHONPATH
108-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
109- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
110+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
111+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
112 #endif
113
114 #ifndef LANDMARK
115@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
116 static char exec_prefix[MAXPATHLEN+1];
117 static char progpath[MAXPATHLEN+1];
118 static char *module_search_path = NULL;
119-static char lib_python[] = "lib/python" VERSION;
120+static char lib_python[] = "lib64/python" VERSION;
121
122 static void
123 reduce(char *dir)
124@@ -528,7 +528,7 @@ calculate_path(void)
125 }
126 else
127 strncpy(zip_path, PREFIX, MAXPATHLEN);
128- joinpath(zip_path, "lib/python00.zip");
129+ joinpath(zip_path, "lib64/python00.zip");
130 bufsz = strlen(zip_path); /* Replace "00" with version */
131 zip_path[bufsz - 6] = VERSION[0];
132 zip_path[bufsz - 5] = VERSION[2];
133@@ -538,7 +538,7 @@ calculate_path(void)
134 fprintf(stderr,
135 "Could not find platform dependent libraries <exec_prefix>\n");
136 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
137- joinpath(exec_prefix, "lib/lib-dynload");
138+ joinpath(exec_prefix, "lib64/lib-dynload");
139 }
140 /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
141
142diff -up Python-2.7.1/Modules/Setup.dist.lib64 Python-2.7.1/Modules/Setup.dist
143--- Python-2.7.1/Modules/Setup.dist.lib64 2010-12-23 15:51:19.400104130 -0500
144+++ Python-2.7.1/Modules/Setup.dist 2010-12-23 15:51:19.427063291 -0500
145@@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm
146 # and the subdirectory of PORT where you built it.
147 DBLIBVER=4.7
148 DBINC=/usr/include/db4
149-DBLIB=/usr/lib
150+DBLIB=/usr/lib64
151 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
152
153 # Historical Berkeley DB 1.85
154@@ -459,7 +459,7 @@ cPickle cPickle.c
155 # Andrew Kuchling's zlib module.
156 # This require zlib 1.1.3 (or later).
157 # See http://www.gzip.org/zlib/
158-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
159+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
160
161 # Interface to the Expat XML parser
162 #
163diff -up Python-2.7.1/setup.py.lib64 Python-2.7.1/setup.py
164--- Python-2.7.1/setup.py.lib64 2010-10-31 12:40:21.000000000 -0400
165+++ Python-2.7.1/setup.py 2010-12-23 15:51:19.428064129 -0500
166@@ -347,7 +347,7 @@ class PyBuildExt(build_ext):
167
168 def detect_modules(self):
169 # Ensure that /usr/local is always used
170- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
171+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
172 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
173
174 # Add paths specified in the environment variables LDFLAGS and
175@@ -654,11 +654,11 @@ class PyBuildExt(build_ext):
176 elif curses_library:
177 readline_libs.append(curses_library)
178 elif self.compiler.find_library_file(lib_dirs +
179- ['/usr/lib/termcap'],
180+ ['/usr/lib64/termcap'],
181 'termcap'):
182 readline_libs.append('termcap')
183 exts.append( Extension('readline', ['readline.c'],
184- library_dirs=['/usr/lib/termcap'],
185+ library_dirs=['/usr/lib64/termcap'],
186 extra_link_args=readline_extra_link_args,
187 libraries=readline_libs) )
188 else:
189@@ -692,8 +692,8 @@ class PyBuildExt(build_ext):
190 if krb5_h:
191 ssl_incs += krb5_h
192 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
193- ['/usr/local/ssl/lib',
194- '/usr/contrib/ssl/lib/'
195+ ['/usr/local/ssl/lib64',
196+ '/usr/contrib/ssl/lib64/'
197 ] )
198
199 if (ssl_incs is not None and