| File: lang/python/files/gar-base.diff | |
|---|---|
| base-0 | patch-1 |
| Line 1 | Line 1 |
| diff --speed-large-files --minimal -Nru tmp/Python-2.2.2/Makefile.pre.in work/main.d/Python-2.2.2/Makefile.pre.in --- tmp/Python-2.2.2/Makefile.pre.in Fri Aug 23 09:05:49 2002 +++ work/main.d/Python-2.2.2/Makefile.pre.in Wed Apr 16 22:07:15 2003 | diff -urN scratch/singularity.d/Python-2.3.2/Makefile.pre.in work/singularity.d/Python-2.3.2/Makefile.pre.in --- scratch/Python-2.3.2/Makefile.pre.in 2003-09-20 03:50:28.000000000 -0700 +++ work/singularity.d/Python-2.3.2/Makefile.pre.in 2003-11-12 18:31:48.000000000 -0800 |
| Line | Line |
| # Compiler options OPT= @OPT@ | # Compiler options OPT= @OPT@ |
| DEFS= @DEFS@ -CFLAGS= $(OPT) +CFLAGS+= $(OPT) CPPFLAGS= -I. -I$(srcdir)/Include $(DEFS) | BASECFLAGS= @BASECFLAGS@ -CFLAGS= $(BASECFLAGS) $(OPT) +CFLAGS+= $(BASECFLAGS) $(OPT) CPPFLAGS= -I. -I$(srcdir)/Include |
| LDFLAGS= @LDFLAGS@ LDLAST= @LDLAST@ | LDFLAGS= @LDFLAGS@ LDLAST= @LDLAST@ |
| @@ -582,7 +582,7 @@ PLATDIR= plat-$(MACHDEP) MACHDEPS= $(PLATDIR) XMLLIBSUBDIRS= xml xml/dom xml/parsers xml/sax | @@ -159,6 +159,7 @@ PYTHON= python$(EXE) BUILDPYTHON= python$(BUILDEXE) +HOSTPYTHON= ./$(BUILDPYTHON) # === Definitions added by makesetup === @@ -186,6 +187,8 @@ # Parser PGEN= Parser/pgen$(EXE) +HOSTPGEN= $(PGEN) + POBJS= \ Parser/acceler.o \ Parser/grammar1.o \ @@ -314,8 +317,8 @@ # 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;; \ + *-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;; \ esac # buildno should really depend on something like LIBRARY_SRC @@ -432,7 +435,7 @@ $(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) @@ -643,9 +646,9 @@ plat-mac/lib-scriptpackages/SystemEvents \ plat-mac/lib-scriptpackages/Terminal PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages |
| -LIBSUBDIRS= lib-old lib-tk site-packages test test/output test/data \ | -LIBSUBDIRS= lib-old lib-tk site-packages test test/output test/data \ |
| - encodings email email/test email/test/data compiler hotshot \ - logging bsddb bsddb/test csv idlelib idlelib/Icons \ | |
| +LIBSUBDIRS= lib-old lib-tk site-packages \ | +LIBSUBDIRS= lib-old lib-tk site-packages \ |
| encodings email compiler hotshot \ | + encodings email compiler hotshot \ + logging bsddb csv idlelib idlelib/Icons \ |
| distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS) libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR) | distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS) libinstall: $(BUILDPYTHON) $(srcdir)/Lib/$(PLATDIR) |
| diff --speed-large-files --minimal -Nru tmp/Python-2.2.2/Modules/Setup.dist work/main.d/Python-2.2.2/Modules/Setup.dist --- tmp/Python-2.2.2/Modules/Setup.dist Thu Aug 8 12:52:42 2002 +++ work/main.d/Python-2.2.2/Modules/Setup.dist Wed Apr 16 22:08:51 2003 @@ -140,7 +140,7 @@ | @for i in $(SCRIPTDIR) $(LIBDEST); \ @@ -703,19 +706,19 @@ 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) PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(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 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ - ./$(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 diff -urN scratch/singularity.d/Python-2.3.2/Modules/Setup.dist work/singularity.d/Python-2.3.2/Modules/Setup.dist --- scratch/Python-2.3.2/Modules/Setup.dist 2003-06-14 14:03:05.000000000 -0700 +++ work/singularity.d/Python-2.3.2/Modules/Setup.dist 2003-11-12 18:33:08.000000000 -0800 @@ -157,7 +157,7 @@ |
| # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. | # it, depending on your system -- see the GNU readline instructions. # It's okay for this to be a shared library, too. |
| Line 31 | Line 96 |
| # Modules that should always be present (non UNIX dependent): | # Modules that should always be present (non UNIX dependent): |
| @@ -346,9 +346,9 @@ | @@ -366,9 +366,9 @@ |
| # # First, look at Setup.config; configure may have set this for you. | # # First, look at Setup.config; configure may have set this for you. |
| Line 43 | Line 108 |
| # Generic (SunOS / SVR4) dynamic loading module. | # Generic (SunOS / SVR4) dynamic loading module. |
| @@ -435,7 +435,7 @@ | @@ -463,7 +463,7 @@ |
| # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ | # Andrew Kuchling's zlib module. # This require zlib 1.1.3 (or later). # See http://www.cdrom.com/pub/infozip/zlib/ |
| Line 52 | Line 117 |
| # Interface to the Expat XML parser # | # Interface to the Expat XML parser # |
| diff -urN scratch/singularity.d/Python-2.3.2/setup.py work/singularity.d/Python-2.3.2/setup.py --- scratch/Python-2.3.2/setup.py 2003-09-21 18:19:45.000000000 -0700 +++ work/singularity.d/Python-2.3.2/setup.py 2003-11-12 18:35:40.000000000 -0800 @@ -206,26 +206,27 @@ try: imp.load_dynamic(ext.name, ext_filename) except ImportError, why: - self.announce('*** WARNING: renaming "%s" since importing it' - ' failed: %s' % (ext.name, why), level=3) - assert not self.inplace - basename, tail = os.path.splitext(ext_filename) - newname = basename + "_failed" + tail - if os.path.exists(newname): - os.remove(newname) - os.rename(ext_filename, newname) - - # XXX -- This relies on a Vile HACK in - # distutils.command.build_ext.build_extension(). The - # _built_objects attribute is stored there strictly for - # use here. - # If there is a failure, _built_objects may not be there, - # so catch the AttributeError and move on. - try: - for filename in self._built_objects: - os.remove(filename) - except AttributeError: - self.announce('unable to remove files (ignored)') + if os.environ['CROSS_COMPILING'] != 'yes': + self.announce('*** WARNING: renaming "%s" since importing it' + ' failed: %s' % (ext.name, why), level=3) + assert not self.inplace + basename, tail = os.path.splitext(ext_filename) + newname = basename + "_failed" + tail + if os.path.exists(newname): + os.remove(newname) + os.rename(ext_filename, newname) + + # XXX -- This relies on a Vile HACK in + # distutils.command.build_ext.build_extension(). The + # _built_objects attribute is stored there strictly for + # use here. + # If there is a failure, _built_objects may not be there, + # so catch the AttributeError and move on. + try: + for filename in self._built_objects: + os.remove(filename) + except AttributeError: + self.announce('unable to remove files (ignored)') except: exc_type, why, tb = sys.exc_info() self.announce('*** WARNING: importing extension "%s" ' | |