1 diff -rduNp Python-2.4.2.orig/Makefile.pre.in Python-2.4.2/Makefile.pre.in
2 --- Python-2.4.2.orig/Makefile.pre.in 2005-03-29 01:23:01.000000000 +0200
3 +++ Python-2.4.2/Makefile.pre.in 2007-01-22 19:37:08.000000000 +0100
4 @@ -162,6 +162,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
7 BUILDPYTHON= python$(BUILDEXE)
8 +HOSTPYTHON= $(BUILDPYTHON)
10 # === Definitions added by makesetup ===
12 @@ -188,7 +189,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
13 ##########################################################################
15 PGEN= Parser/pgen$(EXE)
17 +HOSTPGEN= $(PGEN)$(EXE)
21 @@ -320,8 +321,8 @@ platform: $(BUILDPYTHON)
22 # Build the shared modules
23 sharedmods: $(BUILDPYTHON)
25 - *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
26 - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
27 + *-s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
28 + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
31 # buildno should really depend on something like LIBRARY_SRC
32 @@ -442,7 +443,7 @@ Modules/ccpython.o: $(srcdir)/Modules/cc
35 $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
36 - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
37 + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
40 $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
41 @@ -719,19 +720,19 @@ libinstall: $(BUILDPYTHON) $(srcdir)/Lib
43 $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
44 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
45 - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
46 + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
48 -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
49 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
50 - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
51 + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
53 -x 'badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
54 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
55 - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
56 + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
57 -d $(LIBDEST)/site-packages -f \
58 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
59 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
60 - ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
61 + $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
62 -d $(LIBDEST)/site-packages -f \
63 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
65 @@ -826,7 +827,7 @@ libainstall: all
66 # Install the dynamically loadable modules
67 # This goes into $(exec_prefix)
69 - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
70 + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
72 --install-scripts=$(BINDIR) \
73 --install-platlib=$(DESTSHARED) \
74 diff -rduNp Python-2.4.2.orig/setup.py Python-2.4.2/setup.py
75 --- Python-2.4.2.orig/setup.py 2005-03-09 23:27:24.000000000 +0100
76 +++ Python-2.4.2/setup.py 2007-01-22 19:37:08.000000000 +0100
77 @@ -204,6 +204,7 @@ class PyBuildExt(build_ext):
79 imp.load_dynamic(ext.name, ext_filename)
80 except ImportError, why:
82 self.announce('*** WARNING: renaming "%s" since importing it'
83 ' failed: %s' % (ext.name, why), level=3)
84 assert not self.inplace
85 @@ -239,8 +240,6 @@ class PyBuildExt(build_ext):
87 def detect_modules(self):
88 # Ensure that /usr/local is always used
89 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
90 - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
92 # Add paths to popular package managers on OS X/darwin
93 if sys.platform == "darwin":
94 @@ -251,12 +250,6 @@ class PyBuildExt(build_ext):
95 add_dir_to_list(self.compiler.library_dirs, '/opt/local/lib')
96 add_dir_to_list(self.compiler.include_dirs, '/opt/local/include')
98 - if os.path.normpath(sys.prefix) != '/usr':
99 - add_dir_to_list(self.compiler.library_dirs,
100 - sysconfig.get_config_var("LIBDIR"))
101 - add_dir_to_list(self.compiler.include_dirs,
102 - sysconfig.get_config_var("INCLUDEDIR"))
105 have_unicode = unicode