Magellan Linux

Annotation of /trunk/python/patches/python-2.7.1-lib64.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1448 - (hide annotations) (download)
Wed Jul 27 17:45:56 2011 UTC (12 years, 10 months ago) by niro
File size: 11268 byte(s)
-reworked patch,  lib64 *only* and added usr/X11R7/lib64 search pathes
1 niro 1448 diff -Naur Python-2.7.1/Lib/distutils/command/install.py Python-2.7.1-magellan/Lib/distutils/command/install.py
2     --- Python-2.7.1/Lib/distutils/command/install.py 2010-05-05 21:09:31.000000000 +0200
3     +++ Python-2.7.1-magellan/Lib/distutils/command/install.py 2011-07-27 21:32:25.000000000 +0200
4     @@ -41,15 +41,15 @@
5    
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     + 'purelib': '$base/lib64/python$py_version_short/site-packages',
11     + 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
12     'headers': '$base/include/python$py_version_short/$dist_name',
13     'scripts': '$base/bin',
14     'data' : '$base',
15     },
16     'unix_home': {
17     - 'purelib': '$base/lib/python',
18     - 'platlib': '$base/lib/python',
19     + 'purelib': '$base/lib64/python',
20     + 'platlib': '$base/lib64/python',
21     'headers': '$base/include/python/$dist_name',
22     'scripts': '$base/bin',
23     'data' : '$base',
24     diff -Naur Python-2.7.1/Lib/distutils/sysconfig.py Python-2.7.1-magellan/Lib/distutils/sysconfig.py
25     --- Python-2.7.1/Lib/distutils/sysconfig.py 2010-11-06 15:16:30.000000000 +0100
26     +++ Python-2.7.1-magellan/Lib/distutils/sysconfig.py 2011-07-27 21:34:06.000000000 +0200
27     @@ -114,8 +114,12 @@
28     prefix = plat_specific and EXEC_PREFIX or PREFIX
29    
30     if os.name == "posix":
31     + if plat_specific or standard_lib:
32     + lib = "lib64"
33     + else:
34     + lib = "lib"
35     libpython = os.path.join(prefix,
36     - "lib", "python" + get_python_version())
37     + "lib64", "python" + get_python_version())
38     if standard_lib:
39     return libpython
40     else:
41     diff -Naur Python-2.7.1/Lib/site.py Python-2.7.1-magellan/Lib/site.py
42     --- Python-2.7.1/Lib/site.py 2010-10-13 00:53:51.000000000 +0200
43     +++ Python-2.7.1-magellan/Lib/site.py 2011-07-27 21:39:35.000000000 +0200
44     @@ -288,15 +288,15 @@
45     seen.add(prefix)
46    
47     if sys.platform in ('os2emx', 'riscos'):
48     - sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
49     + sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
50     elif os.sep == '/':
51     - sitepackages.append(os.path.join(prefix, "lib",
52     + sitepackages.append(os.path.join(prefix, "lib64",
53     "python" + sys.version[:3],
54     "site-packages"))
55     - sitepackages.append(os.path.join(prefix, "lib", "site-python"))
56     + sitepackages.append(os.path.join(prefix, "lib64", "site-python"))
57     else:
58     sitepackages.append(prefix)
59     - sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
60     + sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
61     if sys.platform == "darwin":
62     # for framework builds *only* we add the standard Apple
63     # locations.
64     diff -Naur Python-2.7.1/Lib/sysconfig.py Python-2.7.1-magellan/Lib/sysconfig.py
65     --- Python-2.7.1/Lib/sysconfig.py 2010-11-06 05:06:18.000000000 +0100
66     +++ Python-2.7.1-magellan/Lib/sysconfig.py 2011-07-27 21:31:01.000000000 +0200
67     @@ -7,20 +7,20 @@
68    
69     _INSTALL_SCHEMES = {
70     'posix_prefix': {
71     - 'stdlib': '{base}/lib/python{py_version_short}',
72     - 'platstdlib': '{platbase}/lib/python{py_version_short}',
73     + 'stdlib': '{base}/lib64/python{py_version_short}',
74     + 'platstdlib': '{platbase}/lib64/python{py_version_short}',
75     'purelib': '{base}/lib/python{py_version_short}/site-packages',
76     - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
77     + 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
78     'include': '{base}/include/python{py_version_short}',
79     'platinclude': '{platbase}/include/python{py_version_short}',
80     'scripts': '{base}/bin',
81     'data': '{base}',
82     },
83     'posix_home': {
84     - 'stdlib': '{base}/lib/python',
85     - 'platstdlib': '{base}/lib/python',
86     + 'stdlib': '{base}/lib64/python',
87     + 'platstdlib': '{base}/lib64/python',
88     'purelib': '{base}/lib/python',
89     - 'platlib': '{base}/lib/python',
90     + 'platlib': '{base}/lib64/python',
91     'include': '{base}/include/python',
92     'platinclude': '{base}/include/python',
93     'scripts': '{base}/bin',
94     @@ -65,10 +65,10 @@
95     'data' : '{userbase}',
96     },
97     'posix_user': {
98     - 'stdlib': '{userbase}/lib/python{py_version_short}',
99     - 'platstdlib': '{userbase}/lib/python{py_version_short}',
100     + 'stdlib': '{userbase}/lib64/python{py_version_short}',
101     + 'platstdlib': '{userbase}/lib64/python{py_version_short}',
102     'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
103     - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
104     + 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
105     'include': '{userbase}/include/python{py_version_short}',
106     'scripts': '{userbase}/bin',
107     'data' : '{userbase}',
108     diff -Naur Python-2.7.1/Makefile.pre.in Python-2.7.1-magellan/Makefile.pre.in
109     --- Python-2.7.1/Makefile.pre.in 2010-10-14 13:37:30.000000000 +0200
110     +++ Python-2.7.1-magellan/Makefile.pre.in 2011-07-27 21:31:01.000000000 +0200
111     @@ -94,7 +94,7 @@
112     MANDIR= @mandir@
113     INCLUDEDIR= @includedir@
114     CONFINCLUDEDIR= $(exec_prefix)/include
115     -SCRIPTDIR= $(prefix)/lib
116     +SCRIPTDIR= $(prefix)/lib64
117    
118     # Detailed destination directories
119     BINLIBDEST= $(LIBDIR)/python$(VERSION)
120     diff -Naur Python-2.7.1/Modules/getpath.c Python-2.7.1-magellan/Modules/getpath.c
121     --- Python-2.7.1/Modules/getpath.c 2010-10-08 01:37:08.000000000 +0200
122     +++ Python-2.7.1-magellan/Modules/getpath.c 2011-07-27 21:31:01.000000000 +0200
123     @@ -117,8 +117,8 @@
124     #endif
125    
126     #ifndef PYTHONPATH
127     -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
128     - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
129     +#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
130     + EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
131     #endif
132    
133     #ifndef LANDMARK
134     @@ -129,7 +129,7 @@
135     static char exec_prefix[MAXPATHLEN+1];
136     static char progpath[MAXPATHLEN+1];
137     static char *module_search_path = NULL;
138     -static char lib_python[] = "lib/python" VERSION;
139     +static char lib_python[] = "lib64/python" VERSION;
140    
141     static void
142     reduce(char *dir)
143     @@ -528,7 +528,7 @@
144     }
145     else
146     strncpy(zip_path, PREFIX, MAXPATHLEN);
147     - joinpath(zip_path, "lib/python00.zip");
148     + joinpath(zip_path, "lib64/python00.zip");
149     bufsz = strlen(zip_path); /* Replace "00" with version */
150     zip_path[bufsz - 6] = VERSION[0];
151     zip_path[bufsz - 5] = VERSION[2];
152     @@ -538,7 +538,7 @@
153     fprintf(stderr,
154     "Could not find platform dependent libraries <exec_prefix>\n");
155     strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
156     - joinpath(exec_prefix, "lib/lib-dynload");
157     + joinpath(exec_prefix, "lib64/lib-dynload");
158     }
159     /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
160    
161     diff -Naur Python-2.7.1/Modules/Setup.dist Python-2.7.1-magellan/Modules/Setup.dist
162     --- Python-2.7.1/Modules/Setup.dist 2010-08-21 13:40:30.000000000 +0200
163     +++ Python-2.7.1-magellan/Modules/Setup.dist 2011-07-27 21:42:57.000000000 +0200
164     @@ -343,7 +343,7 @@
165     # *** Uncomment and edit to reflect your Tcl/Tk versions:
166     # -ltk8.2 -ltcl8.2 \
167     # *** Uncomment and edit to reflect where your X11 libraries are:
168     -# -L/usr/X11R6/lib \
169     +# -L/usr/X11R6/lib64 \
170     # *** Or uncomment this for Solaris:
171     # -L/usr/openwin/lib \
172     # *** Uncomment these for TOGL extension only:
173     @@ -414,7 +414,7 @@
174     #DB=/usr/local/BerkeleyDB.4.0
175     #DBLIBVER=4.0
176     #DBINC=$(DB)/include
177     -#DBLIB=$(DB)/lib
178     +#DBLIB=$(DB)/lib64
179     #_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
180    
181     # Historical Berkeley DB 1.85
182     @@ -460,7 +460,7 @@
183     # Andrew Kuchling's zlib module.
184     # This require zlib 1.1.3 (or later).
185     # See http://www.gzip.org/zlib/
186     -#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
187     +#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
188    
189     # Interface to the Expat XML parser
190     #
191     diff -Naur Python-2.7.1/setup.py Python-2.7.1-magellan/setup.py
192     --- Python-2.7.1/setup.py 2010-10-31 17:40:21.000000000 +0100
193     +++ Python-2.7.1-magellan/setup.py 2011-07-27 21:49:25.000000000 +0200
194     @@ -347,7 +347,7 @@
195    
196     def detect_modules(self):
197     # Ensure that /usr/local is always used
198     - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
199     + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
200     add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
201    
202     # Add paths specified in the environment variables LDFLAGS and
203     @@ -654,11 +654,11 @@
204     elif curses_library:
205     readline_libs.append(curses_library)
206     elif self.compiler.find_library_file(lib_dirs +
207     - ['/usr/lib/termcap'],
208     + ['/usr/lib64/termcap'],
209     'termcap'):
210     readline_libs.append('termcap')
211     exts.append( Extension('readline', ['readline.c'],
212     - library_dirs=['/usr/lib/termcap'],
213     + library_dirs=['/usr/lib64/termcap'],
214     extra_link_args=readline_extra_link_args,
215     libraries=readline_libs) )
216     else:
217     @@ -692,8 +692,8 @@
218     if krb5_h:
219     ssl_incs += krb5_h
220     ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
221     - ['/usr/local/ssl/lib',
222     - '/usr/contrib/ssl/lib/'
223     + ['/usr/local/ssl/lib64',
224     + '/usr/contrib/ssl/lib64/'
225     ] )
226    
227     if (ssl_incs is not None and
228     @@ -1731,17 +1731,19 @@
229     if platform == 'sunos5':
230     include_dirs.append('/usr/openwin/include')
231     added_lib_dirs.append('/usr/openwin/lib')
232     + elif os.path.exists('/usr/X11R7/include'):
233     + include_dirs.append('/usr/X11R7/include')
234     + added_lib_dirs.append('/usr/X11R7/lib64')
235     elif os.path.exists('/usr/X11R6/include'):
236     include_dirs.append('/usr/X11R6/include')
237     added_lib_dirs.append('/usr/X11R6/lib64')
238     - added_lib_dirs.append('/usr/X11R6/lib')
239     elif os.path.exists('/usr/X11R5/include'):
240     include_dirs.append('/usr/X11R5/include')
241     - added_lib_dirs.append('/usr/X11R5/lib')
242     + added_lib_dirs.append('/usr/X11R5/lib64')
243     else:
244     # Assume default location for X11
245     include_dirs.append('/usr/X11/include')
246     - added_lib_dirs.append('/usr/X11/lib')
247     + added_lib_dirs.append('/usr/X11/lib64')
248    
249     # If Cygwin, then verify that X is installed before proceeding
250     if platform == 'cygwin':