1 http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/python/current/SOURCES/
3 diff -Naur Python-2.5.2.orig/configure Python-2.5.2/configure
4 --- Python-2.5.2.orig/configure 2008-12-04 12:53:20.850370886 +0100
5 +++ Python-2.5.2/configure 2008-12-04 12:56:26.041364487 +0100
8 -# From configure.in Revision: 60465 .
9 +# From configure.in Revision: 60766 .
10 # Guess values for system-dependent variables and create Makefiles.
11 # Generated by GNU Autoconf 2.61 for python 2.5.
22 @@ -3833,6 +3835,49 @@
26 +{ echo "$as_me:$LINENO: checking ARCH" >&5
27 +echo $ECHO_N "checking ARCH... $ECHO_C" >&6; }
32 +{ echo "$as_me:$LINENO: result: $ARCH" >&5
33 +echo "${ECHO_T}$ARCH" >&6; }
36 +{ echo "$as_me:$LINENO: checking LIB" >&5
37 +echo $ECHO_N "checking LIB... $ECHO_C" >&6; }
38 +case $ac_sys_system in
40 + # Test if the compiler is 64bit
41 + echo 'int i;' > conftest.$ac_ext
42 + python_cv_cc_64bit_output=no
43 + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
44 + (eval $ac_compile) 2>&5
46 + echo "$as_me:$LINENO: \$? = $ac_status" >&5
47 + (exit $ac_status); }; then
48 + case `/usr/bin/file conftest.$ac_objext` in
50 + python_cv_cc_64bit_output=yes
58 +case $ARCH:$python_cv_cc_64bit_output in
59 +ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
66 +{ echo "$as_me:$LINENO: result: $LIB" >&5
67 +echo "${ECHO_T}$LIB" >&6; }
70 { echo "$as_me:$LINENO: checking LIBRARY" >&5
71 echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
72 @@ -23367,6 +23412,8 @@
75 BUILDEXEEXT!$BUILDEXEEXT$ac_delim
78 LIBRARY!$LIBRARY$ac_delim
79 LDLIBRARY!$LDLIBRARY$ac_delim
80 DLLLIBRARY!$DLLLIBRARY$ac_delim
81 @@ -23393,8 +23440,6 @@
82 LINKFORSHARED!$LINKFORSHARED$ac_delim
83 CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
84 SHLIBS!$SHLIBS$ac_delim
85 -USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
86 -SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
89 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
90 @@ -23436,6 +23481,8 @@
92 for ac_last_try in false false false false false :; do
93 cat >conf$$subs.sed <<_ACEOF
94 +USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
95 +SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
96 USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
97 LDLAST!$LDLAST$ac_delim
98 THREADOBJ!$THREADOBJ$ac_delim
99 @@ -23457,7 +23504,7 @@
100 LTLIBOBJS!$LTLIBOBJS$ac_delim
103 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
104 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
106 elif $ac_last_try; then
107 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
108 diff -Naur Python-2.5.2.orig/configure.in Python-2.5.2/configure.in
109 --- Python-2.5.2.orig/configure.in 2008-12-04 12:53:22.283369893 +0100
110 +++ Python-2.5.2/configure.in 2008-12-04 12:54:55.362364592 +0100
116 +AC_MSG_CHECKING(ARCH)
121 +AC_MSG_RESULT($ARCH)
124 +AC_MSG_CHECKING(LIB)
125 +case $ac_sys_system in
127 + # Test if the compiler is 64bit
128 + echo 'int i;' > conftest.$ac_ext
129 + python_cv_cc_64bit_output=no
130 + if AC_TRY_EVAL(ac_compile); then
131 + case `/usr/bin/file conftest.$ac_objext` in
133 + python_cv_cc_64bit_output=yes
141 +case $ARCH:$python_cv_cc_64bit_output in
142 +ppc64:yes | powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
152 AC_MSG_CHECKING(LIBRARY)
153 diff -Naur Python-2.5.2.orig/Include/pythonrun.h Python-2.5.2/Include/pythonrun.h
154 --- Python-2.5.2.orig/Include/pythonrun.h 2008-12-04 12:53:23.384369909 +0100
155 +++ Python-2.5.2/Include/pythonrun.h 2008-12-04 12:54:55.366365660 +0100
157 /* In their own files */
158 PyAPI_FUNC(const char *) Py_GetVersion(void);
159 PyAPI_FUNC(const char *) Py_GetPlatform(void);
160 +PyAPI_FUNC(const char *) Py_GetArch(void);
161 +PyAPI_FUNC(const char *) Py_GetLib(void);
162 PyAPI_FUNC(const char *) Py_GetCopyright(void);
163 PyAPI_FUNC(const char *) Py_GetCompiler(void);
164 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
165 diff -Naur Python-2.5.2.orig/Lib/distutils/command/install.py Python-2.5.2/Lib/distutils/command/install.py
166 --- Python-2.5.2.orig/Lib/distutils/command/install.py 2008-12-04 12:53:20.869369116 +0100
167 +++ Python-2.5.2/Lib/distutils/command/install.py 2008-12-04 12:54:55.365365533 +0100
169 from distutils.errors import DistutilsOptionError
170 from glob import glob
174 if sys.version < "2.2":
180 'purelib': '$base/lib/python$py_version_short/site-packages',
181 - 'platlib': '$platbase/lib/python$py_version_short/site-packages',
182 + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
183 'headers': '$base/include/python$py_version_short/$dist_name',
184 'scripts': '$base/bin',
188 'purelib': '$base/lib/python',
189 - 'platlib': '$base/lib/python',
190 + 'platlib': '$base/'+libname+'/python',
191 'headers': '$base/include/python/$dist_name',
192 'scripts': '$base/bin',
194 diff -Naur Python-2.5.2.orig/Lib/distutils/sysconfig.py Python-2.5.2/Lib/distutils/sysconfig.py
195 --- Python-2.5.2.orig/Lib/distutils/sysconfig.py 2008-12-04 12:53:20.868368429 +0100
196 +++ Python-2.5.2/Lib/distutils/sysconfig.py 2008-12-04 12:54:55.364364847 +0100
198 prefix = plat_specific and EXEC_PREFIX or PREFIX
200 if os.name == "posix":
205 libpython = os.path.join(prefix,
206 - "lib", "python" + get_python_version())
207 + lib, "python" + get_python_version())
211 diff -Naur Python-2.5.2.orig/Lib/distutils/tests/test_install.py Python-2.5.2/Lib/distutils/tests/test_install.py
212 --- Python-2.5.2.orig/Lib/distutils/tests/test_install.py 2008-12-04 12:53:20.870370919 +0100
213 +++ Python-2.5.2/Lib/distutils/tests/test_install.py 2008-12-04 12:54:55.365365533 +0100
215 """Tests for distutils.command.install."""
221 from distutils.command.install import install
223 self.assertEqual(got, expected)
225 libdir = os.path.join(destination, "lib", "python")
226 + platlibdir = os.path.join(destination, sys.lib, "python")
227 check_path(cmd.install_lib, libdir)
228 - check_path(cmd.install_platlib, libdir)
229 + check_path(cmd.install_platlib, platlibdir)
230 check_path(cmd.install_purelib, libdir)
231 check_path(cmd.install_headers,
232 os.path.join(destination, "include", "python", "foopkg"))
233 diff -Naur Python-2.5.2.orig/Lib/site.py Python-2.5.2/Lib/site.py
234 --- Python-2.5.2.orig/Lib/site.py 2008-12-04 12:53:20.861370890 +0100
235 +++ Python-2.5.2/Lib/site.py 2008-12-04 12:54:55.364364847 +0100
236 @@ -182,12 +182,18 @@
237 sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
239 sitedirs = [os.path.join(prefix,
242 "python" + sys.version[:3],
244 - os.path.join(prefix, "lib", "site-python")]
245 + os.path.join(prefix, sys.lib, "site-python")]
246 + if sys.lib != 'lib':
247 + sitedirs.append(os.path.join(prefix,
249 + "python" + sys.version[:3],
251 + sitedirs.append(os.path.join(prefix, 'lib', "site-python"))
253 - sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
254 + sitedirs = [prefix, os.path.join(prefix, sys.lib, "site-packages")]
255 if sys.platform == 'darwin':
256 # for framework builds *only* we add the standard Apple
257 # locations. Currently only per-user, but /Library and
258 diff -Naur Python-2.5.2.orig/Makefile.pre.in Python-2.5.2/Makefile.pre.in
259 --- Python-2.5.2.orig/Makefile.pre.in 2008-12-04 12:53:22.283369893 +0100
260 +++ Python-2.5.2/Makefile.pre.in 2008-12-04 12:54:55.353367357 +0100
263 # Machine-dependent subdirectories
268 # Install prefix for architecture-independent files
272 # Expanded directories
273 BINDIR= $(exec_prefix)/bin
274 -LIBDIR= $(exec_prefix)/lib
275 +LIBDIR= $(exec_prefix)/$(LIB)
277 INCLUDEDIR= @includedir@
278 CONFINCLUDEDIR= $(exec_prefix)/include
279 -SCRIPTDIR= $(prefix)/lib
280 +SCRIPTDIR= $(prefix)/$(LIB)
282 # Detailed destination directories
283 BINLIBDEST= $(LIBDIR)/python$(VERSION)
285 Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H)
287 Python/getplatform.o: $(srcdir)/Python/getplatform.c
288 - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
289 + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
291 Python/importdl.o: $(srcdir)/Python/importdl.c
292 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
293 diff -Naur Python-2.5.2.orig/Modules/getpath.c Python-2.5.2/Modules/getpath.c
294 --- Python-2.5.2.orig/Modules/getpath.c 2008-12-04 12:53:23.369370512 +0100
295 +++ Python-2.5.2/Modules/getpath.c 2008-12-04 12:54:55.364364847 +0100
297 #define EXEC_PREFIX PREFIX
301 +#if defined(__x86_64__) || defined(__powerpc64__)
302 +#define LIB_PYTHON "lib64/python" VERSION
304 +#define LIB_PYTHON "lib/python" VERSION
309 -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
310 - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
311 +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
312 + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
317 static char exec_prefix[MAXPATHLEN+1];
318 static char progpath[MAXPATHLEN+1];
319 static char *module_search_path = NULL;
320 -static char lib_python[] = "lib/python" VERSION;
321 +static char lib_python[] = LIB_PYTHON;
325 diff -Naur Python-2.5.2.orig/Python/getplatform.c Python-2.5.2/Python/getplatform.c
326 --- Python-2.5.2.orig/Python/getplatform.c 2008-12-04 12:53:23.173370128 +0100
327 +++ Python-2.5.2/Python/getplatform.c 2008-12-04 12:54:55.365365533 +0100
334 +#define ARCH "unknown"
352 diff -Naur Python-2.5.2.orig/Python/sysmodule.c Python-2.5.2/Python/sysmodule.c
353 --- Python-2.5.2.orig/Python/sysmodule.c 2008-12-04 12:53:23.175368986 +0100
354 +++ Python-2.5.2/Python/sysmodule.c 2008-12-04 12:54:55.366365660 +0100
355 @@ -1159,6 +1159,10 @@
356 PyString_FromString(Py_GetPlatform()));
357 SET_SYS_FROM_STRING("executable",
358 PyString_FromString(Py_GetProgramFullPath()));
359 + SET_SYS_FROM_STRING("arch",
360 + PyString_FromString(Py_GetArch()));
361 + SET_SYS_FROM_STRING("lib",
362 + PyString_FromString(Py_GetLib()));
363 SET_SYS_FROM_STRING("prefix",
364 PyString_FromString(Py_GetPrefix()));
365 SET_SYS_FROM_STRING("exec_prefix",
366 diff -Naur Python-2.5.2.orig/setup.py Python-2.5.2/setup.py
367 --- Python-2.5.2.orig/setup.py 2008-12-04 12:53:22.286366085 +0100
368 +++ Python-2.5.2/setup.py 2008-12-04 12:54:55.363365837 +0100
369 @@ -291,12 +291,12 @@
374 # lib_dirs and inc_dirs are used to search for files;
375 # if a file is found in one of those directories, it can
376 # be assumed that no additional -I,-L directives are needed.
377 lib_dirs = self.compiler.library_dirs + [
378 - '/lib64', '/usr/lib64',
379 - '/lib', '/usr/lib',
380 + libname, '/usr/'+libname
382 inc_dirs = self.compiler.include_dirs + ['/usr/include']
384 @@ -497,11 +497,11 @@
385 elif self.compiler.find_library_file(lib_dirs, 'curses'):
386 readline_libs.append('curses')
387 elif self.compiler.find_library_file(lib_dirs +
388 - ['/usr/lib/termcap'],
389 + ['/usr/'+libname+'/termcap'],
391 readline_libs.append('termcap')
392 exts.append( Extension('readline', ['readline.c'],
393 - library_dirs=['/usr/lib/termcap'],
394 + library_dirs=['/usr/'+libname+'/termcap'],
395 extra_link_args=readline_extra_link_args,
396 libraries=readline_libs) )
397 if platform not in ['mac']:
398 @@ -1267,8 +1267,8 @@
399 added_lib_dirs.append('/usr/openwin/lib')
400 elif os.path.exists('/usr/X11R6/include'):
401 include_dirs.append('/usr/X11R6/include')
402 - added_lib_dirs.append('/usr/X11R6/lib64')
403 - added_lib_dirs.append('/usr/X11R6/lib')
404 + added_lib_dirs.append('/usr/X11R6/'+sys.lib)
405 + #added_lib_dirs.append('/usr/X11R6/lib')
406 elif os.path.exists('/usr/X11R5/include'):
407 include_dirs.append('/usr/X11R5/include')
408 added_lib_dirs.append('/usr/X11R5/lib')