1 --- Python-2.4.1/Include/pythonrun.h.lib64 2005-08-25 14:19:42.000000000 +0200
2 +++ Python-2.4.1/Include/pythonrun.h 2005-08-25 14:19:39.000000000 +0200
4 /* In their own files */
5 PyAPI_FUNC(const char *) Py_GetVersion(void);
6 PyAPI_FUNC(const char *) Py_GetPlatform(void);
7 +PyAPI_FUNC(const char *) Py_GetArch(void);
8 +PyAPI_FUNC(const char *) Py_GetLib(void);
9 PyAPI_FUNC(const char *) Py_GetCopyright(void);
10 PyAPI_FUNC(const char *) Py_GetCompiler(void);
11 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
12 --- Python-2.4.1/Lib/distutils/command/install.py.lib64 2005-08-25 14:20:10.000000000 +0200
13 +++ Python-2.4.1/Lib/distutils/command/install.py 2005-08-25 14:20:09.000000000 +0200
15 from distutils.errors import DistutilsOptionError
20 if sys.version < "2.2":
27 - 'purelib': '$base/lib/python$py_version_short/site-packages',
28 - 'platlib': '$platbase/lib/python$py_version_short/site-packages',
29 + 'purelib': '$base/'+libname+'/python$py_version_short/site-packages',
30 + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
31 'headers': '$base/include/python$py_version_short/$dist_name',
32 'scripts': '$base/bin',
36 - 'purelib': '$base/lib/python',
37 - 'platlib': '$base/lib/python',
38 + 'purelib': '$base/'+libname+'/python',
39 + 'platlib': '$base/'+libname+'/python',
40 'headers': '$base/include/python/$dist_name',
41 'scripts': '$base/bin',
43 --- Python-2.4.1/Lib/distutils/tests/test_install.py.lib64 2005-08-25 14:20:13.000000000 +0200
44 +++ Python-2.4.1/Lib/distutils/tests/test_install.py 2005-08-25 14:20:13.000000000 +0200
46 """Tests for distutils.command.install."""
52 from distutils.command.install import install
54 expected = os.path.normpath(expected)
55 self.assertEqual(got, expected)
57 - libdir = os.path.join(destination, "lib", "python")
58 + libdir = os.path.join(destination, sys.lib, "python")
59 check_path(cmd.install_lib, libdir)
60 check_path(cmd.install_platlib, libdir)
61 check_path(cmd.install_purelib, libdir)
62 --- Python-2.4.1/Lib/distutils/sysconfig.py.lib64 2005-08-25 14:20:13.000000000 +0200
63 +++ Python-2.4.1/Lib/distutils/sysconfig.py 2005-08-25 14:20:12.000000000 +0200
66 if os.name == "posix":
67 libpython = os.path.join(prefix,
68 - "lib", "python" + get_python_version())
69 + sys.lib, "python" + get_python_version())
73 --- Python-2.4.1/Lib/site.py.lib64 2005-08-25 14:21:50.000000000 +0200
74 +++ Python-2.4.1/Lib/site.py 2005-08-25 14:55:33.000000000 +0200
76 sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
78 sitedirs = [os.path.join(prefix,
81 "python" + sys.version[:3],
83 - os.path.join(prefix, "lib", "site-python")]
84 + os.path.join(prefix, sys.lib, "site-python")]
85 + if sys.lib != 'lib':
86 + sitedirs.append(os.path.join(prefix,
88 + "python" + sys.version[:3],
90 + sitedirs.append(os.path.join(prefix, 'lib', "site-python"))
92 - sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
93 + sitedirs = [prefix, os.path.join(prefix, sys.lib, "site-packages")]
94 if sys.platform == 'darwin':
95 # for framework builds *only* we add the standard Apple
96 # locations. Currently only per-user, but /Library and
97 --- Python-2.4.1/Modules/getpath.c.lib64 2005-08-25 14:23:20.000000000 +0200
98 +++ Python-2.4.1/Modules/getpath.c 2005-08-25 14:23:06.000000000 +0200
100 #define EXEC_PREFIX PREFIX
104 +#if defined(__x86_64__)
105 +#define LIB_PYTHON "lib64/python" VERSION
107 +#define LIB_PYTHON "lib/python" VERSION
112 -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
113 - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
114 +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
115 + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
120 static char exec_prefix[MAXPATHLEN+1];
121 static char progpath[MAXPATHLEN+1];
122 static char *module_search_path = NULL;
123 -static char lib_python[] = "lib/python" VERSION;
124 +static char lib_python[] = LIB_PYTHON;
128 --- Python-2.4.1/Python/getplatform.c.lib64 2005-08-25 14:23:53.000000000 +0200
129 +++ Python-2.4.1/Python/getplatform.c 2005-08-25 14:23:47.000000000 +0200
136 +#define ARCH "unknown"
154 --- Python-2.4.1/Python/sysmodule.c.lib64 2005-08-25 14:23:53.000000000 +0200
155 +++ Python-2.4.1/Python/sysmodule.c 2005-08-25 14:23:52.000000000 +0200
156 @@ -1022,6 +1022,12 @@
157 PyDict_SetItemString(sysdict, "platform",
158 v = PyString_FromString(Py_GetPlatform()));
160 + PyDict_SetItemString(sysdict, "arch",
161 + v = PyString_FromString(Py_GetArch()));
163 + PyDict_SetItemString(sysdict, "lib",
164 + v = PyString_FromString(Py_GetLib()));
166 PyDict_SetItemString(sysdict, "executable",
167 v = PyString_FromString(Py_GetProgramFullPath()));
169 --- Python-2.4.1/configure.in.lib64 2005-08-25 14:24:33.000000000 +0200
170 +++ Python-2.4.1/configure.in 2005-08-25 14:19:07.000000000 +0200
176 +AC_MSG_CHECKING(ARCH)
181 +AC_MSG_RESULT($ARCH)
184 +AC_MSG_CHECKING(LIB)
185 +case $ac_sys_system in
187 + # Test if the compiler is 64bit
188 + echo 'int i;' > conftest.$ac_ext
189 + python_cv_cc_64bit_output=no
190 + if AC_TRY_EVAL(ac_compile); then
191 + case `/usr/bin/file conftest.$ac_objext` in
193 + python_cv_cc_64bit_output=yes
201 +case $ARCH:$python_cv_cc_64bit_output in
202 +powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
212 AC_MSG_CHECKING(LIBRARY)
213 --- Python-2.4.1/Makefile.pre.in.lib64 2005-08-25 14:24:35.000000000 +0200
214 +++ Python-2.4.1/Makefile.pre.in 2005-08-25 14:19:06.000000000 +0200
217 # Machine-dependent subdirectories
222 # Install prefix for architecture-independent files
226 # Expanded directories
227 BINDIR= $(exec_prefix)/bin
228 -LIBDIR= $(exec_prefix)/lib
229 +LIBDIR= $(exec_prefix)/$(LIB)
231 INCLUDEDIR= @includedir@
232 CONFINCLUDEDIR= $(exec_prefix)/include
233 -SCRIPTDIR= $(prefix)/lib
234 +SCRIPTDIR= $(prefix)/$(LIB)
236 # Detailed destination directories
237 BINLIBDEST= $(LIBDIR)/python$(VERSION)
239 Python/compile.o Python/symtable.o: $(GRAMMAR_H)
241 Python/getplatform.o: $(srcdir)/Python/getplatform.c
242 - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
243 + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
245 Python/importdl.o: $(srcdir)/Python/importdl.c
246 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
247 --- Python-2.4.1/setup.py.lib64 2005-08-25 14:24:35.000000000 +0200
248 +++ Python-2.4.1/setup.py 2005-08-25 14:19:07.000000000 +0200
249 @@ -259,12 +259,12 @@
254 # lib_dirs and inc_dirs are used to search for files;
255 # if a file is found in one of those directories, it can
256 # be assumed that no additional -I,-L directives are needed.
257 lib_dirs = self.compiler.library_dirs + [
258 - '/lib64', '/usr/lib64',
259 - '/lib', '/usr/lib',
260 + libname, '/usr/'+libname
262 inc_dirs = self.compiler.include_dirs + ['/usr/include']
264 @@ -426,11 +426,11 @@
265 elif self.compiler.find_library_file(lib_dirs, 'curses'):
266 readline_libs.append('curses')
267 elif self.compiler.find_library_file(lib_dirs +
268 - ['/usr/lib/termcap'],
269 + ['/usr/'+libname+'/termcap'],
271 readline_libs.append('termcap')
272 exts.append( Extension('readline', ['readline.c'],
273 - library_dirs=['/usr/lib/termcap'],
274 + library_dirs=['/usr/'+libname+'/termcap'],
275 libraries=readline_libs) )
276 if platform not in ['mac']:
278 @@ -1017,8 +1017,8 @@
279 added_lib_dirs.append('/usr/openwin/lib')
280 elif os.path.exists('/usr/X11R6/include'):
281 include_dirs.append('/usr/X11R6/include')
282 - added_lib_dirs.append('/usr/X11R6/lib64')
283 - added_lib_dirs.append('/usr/X11R6/lib')
284 + added_lib_dirs.append('/usr/X11R6/'+sys.lib)
285 + #added_lib_dirs.append('/usr/X11R6/lib')
286 elif os.path.exists('/usr/X11R5/include'):
287 include_dirs.append('/usr/X11R5/include')
288 added_lib_dirs.append('/usr/X11R5/lib')