diff -Naur Python-2.2.1.old/Lib/distutils/util.py Python-2.2.1/Lib/distutils/util.py --- Python-2.2.1.old/Lib/distutils/util.py Fri Dec 7 05:51:35 2001 +++ Python-2.2.1/Lib/distutils/util.py Wed Aug 7 21:56:01 2002 @@ -41,6 +41,11 @@ # Try to distinguish various flavours of Unix (osname, host, release, version, machine) = os.uname() + + # On MacOS X, remove space from machine name + + if machine == "Power Macintosh": + machine = "PowerMacintosh" # Convert the OS name to lowercase and remove '/' characters # (to accommodate BSD/OS) diff -Naur Python-2.2.1.old/Makefile.pre.in Python-2.2.1/Makefile.pre.in --- Python-2.2.1.old/Makefile.pre.in Tue Mar 5 22:52:29 2002 +++ Python-2.2.1/Makefile.pre.in Wed Aug 7 21:56:01 2002 @@ -56,7 +56,7 @@ OPT= @OPT@ DEFS= @DEFS@ CFLAGS= $(OPT) -CPPFLAGS= -I. -I$(srcdir)/Include $(DEFS) +CPPFLAGS= -I. -I/include -I$(srcdir)/Include $(DEFS) LDFLAGS= @LDFLAGS@ LDLAST= @LDLAST@ SGI_ABI= @SGI_ABI@ @@ -407,7 +407,7 @@ -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) $(PGEN): $(PGENOBJS) - $(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN) + $(CC) $(OPT) $(PGENOBJS) $(LDFLAGS) $(LIBS) -o $(PGEN) Parser/grammar.o: $(srcdir)/Parser/grammar.c \ $(srcdir)/Include/token.h \ diff -Naur Python-2.2.1.old/Misc/setuid-prog.c Python-2.2.1/Misc/setuid-prog.c --- Python-2.2.1.old/Misc/setuid-prog.c Fri Sep 11 05:18:09 1998 +++ Python-2.2.1/Misc/setuid-prog.c Wed Aug 7 21:56:01 2002 @@ -70,6 +70,12 @@ #define environ _environ #endif +#if defined(__APPLE__) +# include +# include +# define environ (*_NSGetEnviron()) +#endif /* __APPLE__ */ + /* don't change def_IFS */ char def_IFS[] = "IFS= \t\n"; /* you may want to change def_PATH, but you should really change it in */ diff -Naur Python-2.2.1.old/Modules/posixmodule.c Python-2.2.1/Modules/posixmodule.c --- Python-2.2.1.old/Modules/posixmodule.c Wed Mar 13 06:38:31 2002 +++ Python-2.2.1/Modules/posixmodule.c Wed Aug 7 21:56:01 2002 @@ -19,6 +19,11 @@ #include "Python.h" #include "structseq.h" +#if defined(__APPLE__) +# include +# include +# define environ (*_NSGetEnviron()) +#endif /* __APPLE__ */ #if defined(PYOS_OS2) #define INCL_DOS #define INCL_DOSERRORS diff -Naur Python-2.2.1.old/configure Python-2.2.1/configure diff -Naur Python-2.2.1.old/setup.py Python-2.2.1/setup.py --- Python-2.2.1.old/setup.py Tue Mar 26 22:43:04 2002 +++ Python-2.2.1/setup.py Wed Aug 7 21:56:00 2002 @@ -203,6 +203,12 @@ if '/usr/local/include' not in self.compiler.include_dirs: self.compiler.include_dirs.insert(0, '/usr/local/include' ) + # Ensure that is always used + if '/lib' not in self.compiler.library_dirs: + self.compiler.library_dirs.insert(0, '/lib') + if '/include' not in self.compiler.include_dirs: + self.compiler.include_dirs.insert(0, '/include' ) + try: have_unicode = unicode except NameError: @@ -338,7 +344,6 @@ 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], - library_dirs=['/usr/lib/termcap'], libraries=readline_libs) ) # crypt module. --- Python-2.2.2/Lib/robotparser.py Sun Dec 30 17:21:56 2001 +++ Python-2.2.2/Lib/robotparser.py Fri Jan 4 19:03:49 2002 @@ -41,7 +41,11 @@ def read(self): opener = URLopener() f = opener.open(self.url) - lines = f.readlines() + lines = [] + line = f.readline() + while line: + lines.append(line.strip()) + line = f.readline() self.errcode = opener.errcode if self.errcode == 401 or self.errcode == 403: self.disallow_all = 1 @@ -62,7 +66,6 @@ entry = Entry() for line in lines: - line = line.strip() linenumber = linenumber + 1 if not line: if state==1: @@ -199,24 +202,11 @@ def __init__(self, *args): apply(urllib.FancyURLopener.__init__, (self,) + args) self.errcode = 200 - self.tries = 0 - self.maxtries = 10 def http_error_default(self, url, fp, errcode, errmsg, headers): self.errcode = errcode return urllib.FancyURLopener.http_error_default(self, url, fp, errcode, errmsg, headers) - - def http_error_302(self, url, fp, errcode, errmsg, headers, data=None): - self.tries += 1 - if self.tries >= self.maxtries: - return self.http_error_default(url, fp, 500, - "Internal Server Error: Redirect Recursion", - headers) - result = urllib.FancyURLopener.http_error_302(self, url, fp, errcode, - errmsg, headers, data) - self.tries = 0 - return result def _check(a,b): if not b: