2007-01-22 19:48:48 +01:00
|
|
|
diff -rduNp Python-2.4.2.orig/Makefile.pre.in Python-2.4.2/Makefile.pre.in
|
|
|
|
--- Python-2.4.2.orig/Makefile.pre.in 2005-03-29 01:23:01.000000000 +0200
|
|
|
|
+++ Python-2.4.2/Makefile.pre.in 2007-01-22 19:37:08.000000000 +0100
|
|
|
|
@@ -162,6 +162,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
|
2004-10-08 23:48:43 +02:00
|
|
|
|
|
|
|
PYTHON= python$(EXE)
|
|
|
|
BUILDPYTHON= python$(BUILDEXE)
|
2005-08-13 04:45:34 +02:00
|
|
|
+HOSTPYTHON= $(BUILDPYTHON)
|
2004-10-08 23:48:43 +02:00
|
|
|
|
|
|
|
# === Definitions added by makesetup ===
|
|
|
|
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -188,7 +189,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
|
2005-08-13 04:45:34 +02:00
|
|
|
##########################################################################
|
2004-10-08 23:48:43 +02:00
|
|
|
# Parser
|
|
|
|
PGEN= Parser/pgen$(EXE)
|
2005-08-13 04:45:34 +02:00
|
|
|
-
|
|
|
|
+HOSTPGEN= $(PGEN)$(EXE)
|
2004-10-08 23:48:43 +02:00
|
|
|
POBJS= \
|
|
|
|
Parser/acceler.o \
|
|
|
|
Parser/grammar1.o \
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -320,8 +321,8 @@ platform: $(BUILDPYTHON)
|
2004-10-08 23:48:43 +02:00
|
|
|
# Build the shared modules
|
|
|
|
sharedmods: $(BUILDPYTHON)
|
|
|
|
case $$MAKEFLAGS in \
|
|
|
|
- *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
|
|
|
|
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
2005-08-13 04:45:34 +02:00
|
|
|
+ *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
|
|
|
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
2004-10-08 23:48:43 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
# buildno should really depend on something like LIBRARY_SRC
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -442,7 +443,7 @@ Modules/ccpython.o: $(srcdir)/Modules/cc
|
2004-10-08 23:48:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
|
|
|
|
- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
|
|
|
+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
|
|
|
|
|
|
|
$(PGEN): $(PGENOBJS)
|
|
|
|
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -719,19 +720,19 @@ libinstall: $(BUILDPYTHON) $(srcdir)/Lib
|
2004-10-08 23:48:43 +02:00
|
|
|
done
|
|
|
|
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
|
|
|
|
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
|
|
- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
-d $(LIBDEST) -f \
|
|
|
|
-x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
|
|
|
|
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
|
|
|
- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
-d $(LIBDEST) -f \
|
|
|
|
-x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
|
2005-08-13 04:45:34 +02:00
|
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
2004-10-08 23:48:43 +02:00
|
|
|
- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
-d $(LIBDEST)/site-packages -f \
|
|
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
2005-08-13 04:45:34 +02:00
|
|
|
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
2004-10-08 23:48:43 +02:00
|
|
|
- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
|
|
|
-d $(LIBDEST)/site-packages -f \
|
|
|
|
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
|
|
|
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -826,7 +827,7 @@ libainstall: all
|
2004-10-08 23:48:43 +02:00
|
|
|
# Install the dynamically loadable modules
|
|
|
|
# This goes into $(exec_prefix)
|
|
|
|
sharedinstall:
|
|
|
|
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
|
2005-08-13 04:45:34 +02:00
|
|
|
+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
2004-10-08 23:48:43 +02:00
|
|
|
--prefix=$(prefix) \
|
|
|
|
--install-scripts=$(BINDIR) \
|
|
|
|
--install-platlib=$(DESTSHARED) \
|
2007-01-22 19:48:48 +01:00
|
|
|
diff -rduNp Python-2.4.2.orig/setup.py Python-2.4.2/setup.py
|
|
|
|
--- Python-2.4.2.orig/setup.py 2005-03-09 23:27:24.000000000 +0100
|
|
|
|
+++ Python-2.4.2/setup.py 2007-01-22 19:37:08.000000000 +0100
|
|
|
|
@@ -204,6 +204,7 @@ class PyBuildExt(build_ext):
|
2004-10-08 23:48:43 +02:00
|
|
|
try:
|
|
|
|
imp.load_dynamic(ext.name, ext_filename)
|
|
|
|
except ImportError, why:
|
2005-08-13 04:45:34 +02:00
|
|
|
+ return
|
2004-10-08 23:48:43 +02:00
|
|
|
self.announce('*** WARNING: renaming "%s" since importing it'
|
|
|
|
' failed: %s' % (ext.name, why), level=3)
|
|
|
|
assert not self.inplace
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -239,8 +240,6 @@ class PyBuildExt(build_ext):
|
2004-10-08 23:48:43 +02:00
|
|
|
|
|
|
|
def detect_modules(self):
|
|
|
|
# Ensure that /usr/local is always used
|
|
|
|
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
|
|
|
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
|
|
|
|
2005-08-13 04:45:34 +02:00
|
|
|
# Add paths to popular package managers on OS X/darwin
|
|
|
|
if sys.platform == "darwin":
|
2007-01-22 19:48:48 +01:00
|
|
|
@@ -251,12 +250,6 @@ class PyBuildExt(build_ext):
|
2005-08-13 04:45:34 +02:00
|
|
|
add_dir_to_list(self.compiler.library_dirs, '/opt/local/lib')
|
|
|
|
add_dir_to_list(self.compiler.include_dirs, '/opt/local/include')
|
2004-10-08 23:48:43 +02:00
|
|
|
|
|
|
|
- if os.path.normpath(sys.prefix) != '/usr':
|
|
|
|
- add_dir_to_list(self.compiler.library_dirs,
|
|
|
|
- sysconfig.get_config_var("LIBDIR"))
|
|
|
|
- add_dir_to_list(self.compiler.include_dirs,
|
|
|
|
- sysconfig.get_config_var("INCLUDEDIR"))
|
2005-08-13 04:45:34 +02:00
|
|
|
-
|
2004-10-08 23:48:43 +02:00
|
|
|
try:
|
|
|
|
have_unicode = unicode
|
2005-08-13 04:45:34 +02:00
|
|
|
except NameError:
|