summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python/files')
-rw-r--r--dev-lang/python/files/depreorder.py26
-rw-r--r--dev-lang/python/files/python-2.2.1-r5-gentoo.diff9
-rw-r--r--dev-lang/python/files/python-2.2.2-tk-8.4.x.patch9
-rw-r--r--dev-lang/python/files/python-2.2.3-db4.patch10
-rw-r--r--dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch20
-rw-r--r--dev-lang/python/files/python-2.4-lib64.patch144
-rw-r--r--dev-lang/python/files/python-2.4-libdir.patch15
-rw-r--r--dev-lang/python/files/python-2.4-readline.patch16
-rw-r--r--dev-lang/python/files/python-2.4.1-libdir.patch91
-rw-r--r--dev-lang/python/files/python-config-2.22
-rw-r--r--dev-lang/python/files/python-config-2.2.12
-rw-r--r--dev-lang/python/files/python-updater140
12 files changed, 219 insertions, 265 deletions
diff --git a/dev-lang/python/files/depreorder.py b/dev-lang/python/files/depreorder.py
index 2305eb08aacd..2350da2e3b00 100644
--- a/dev-lang/python/files/depreorder.py
+++ b/dev-lang/python/files/depreorder.py
@@ -18,25 +18,18 @@ DEP_DEPLIST = 1
DEP_SLOT = 2
dep_cache = {}
-
# very simply, we extract the dependencies for each package
for pkg in pkgs_to_reorder:
try:
- deps, slot = varapi.aux_get(pkg, ["DEPEND", "SLOT"])
+ deps, slot = varapi.aux_get(pkg, ["DEPEND", "SLOT"])
except ValueError:
- sys.stderr.write("Error getting dependency information off " + pkg + "\n")
- continue
- try:
- realdeps = portage.dep_check(deps, fakedbapi)
- except TypeError:
- # we're probably running >=portage-2.0.50
- pkgsettings = portage.config(clone=portage.settings)
- realdeps = portage.dep_check(deps, fakedbapi, pkgsettings)
-
+ sys.stderr.write("Error getting dependency information off " + pkg + "\n")
+ continue
+ realdeps = portage.dep_check(deps, fakedbapi)
vardeps = []
# match() finds the versions of all those that are installed
for dep in realdeps[1]:
- vardeps = vardeps + varapi.match(dep)
+ vardeps = vardeps + varapi.match(dep)
dep_cache[pkg] = ( 0, vardeps, slot )
# then we just naively append to a sorted list of deps using this rule.
@@ -47,9 +40,8 @@ for pkg in pkgs_to_reorder:
for pkg, depinfo in dep_cache.items():
dep_to_add = []
for dep in depinfo[DEP_DEPLIST]:
- if dep in pkgs_to_reorder:
- dep_to_add.append(dep)
-
+ if dep in pkgs_to_reorder:
+ dep_to_add.append(dep)
pkgs_ordered += dep_to_add + [pkg]
# now, because the packages may have nested or multple dependencies, we
@@ -58,8 +50,8 @@ for pkg, depinfo in dep_cache.items():
# comes before the package that depends on it.
pkgs_final_order = []
for pkg in pkgs_ordered:
- if pkg not in pkgs_final_order:
- pkgs_final_order += [pkg]
+ if pkg not in pkgs_final_order:
+ pkgs_final_order += [pkg]
print string.join(pkgs_final_order, "\n")
#print portage.dep_expand("=dev-python/sip-3.8", portage.portdb)
diff --git a/dev-lang/python/files/python-2.2.1-r5-gentoo.diff b/dev-lang/python/files/python-2.2.1-r5-gentoo.diff
index 7dd90f72f209..13d74f626918 100644
--- a/dev-lang/python/files/python-2.2.1-r5-gentoo.diff
+++ b/dev-lang/python/files/python-2.2.1-r5-gentoo.diff
@@ -84,6 +84,15 @@ retrieving revision 1.73.4.7
diff -u -r1.73.4.4 -r1.73.4.7
--- python/python/dist/src/setup.py 2002/03/26 13:43:04 1.73.4.4
+++ python/python/dist/src/setup.py 2002/08/08 19:52:42 1.73.4.7
+@@ -1,7 +1,7 @@
+ # Autodetecting setup.py script for building the Python extensions
+ #
+
+-__version__ = "$Revision: 1.1 $"
++__version__ = "$Revision: 1.1 $"
+
+ import sys, os, getopt
+ from distutils import sysconfig
@@ -273,8 +273,6 @@
exts.append( Extension('pwd', ['pwdmodule.c']) )
# grp(3)
diff --git a/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch b/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch
index 0dc581cb630b..498100bc476e 100644
--- a/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch
+++ b/dev-lang/python/files/python-2.2.2-tk-8.4.x.patch
@@ -5,6 +5,15 @@ retrieving revision 1.160.10.3
diff -u -r1.160.10.2 -r1.160.10.3
--- python/python/dist/src/Lib/lib-tk/Tkinter.py 2002/08/23 15:27:52 1.160.10.2
+++ python/python/dist/src/Lib/lib-tk/Tkinter.py 2003/03/29 09:48:12 1.160.10.3
+@@ -27,7 +27,7 @@
+ tk.mainloop()
+ """
+
+-__version__ = "$Revision: 1.1 $"
++__version__ = "$Revision: 1.1 $"
+
+ import sys
+ if sys.platform == "win32":
@@ -1024,38 +1024,54 @@
"""Internal function."""
if len(args) != len(self._subst_format): return args
diff --git a/dev-lang/python/files/python-2.2.3-db4.patch b/dev-lang/python/files/python-2.2.3-db4.patch
index 2405f8e0fd0c..76180c95a745 100644
--- a/dev-lang/python/files/python-2.2.3-db4.patch
+++ b/dev-lang/python/files/python-2.2.3-db4.patch
@@ -1,15 +1,13 @@
--- Python-2.2.3/setup.py 2003-05-22 18:36:54.000000000 +0100
+++ Python-2.2.3.new/setup.py 2003-07-03 19:42:29.000000000 +0100
-@@ -429,8 +429,12 @@
+@@ -429,8 +429,10 @@
# Berkeley DB 3.x.)
dblib = []
- if self.compiler.find_library_file(lib_dirs, 'db-3.2'):
- dblib = ['db-3.2']
-+ if self.compiler.find_library_file(lib_dirs, 'db-4.1'):
-+ dblib = ['db-4.1']
-+ elif self.compiler.find_library_file(lib_dirs, 'db-4.0'):
-+ dblib = ['db-4.0']
++ if self.compiler.find_library_file(lib_dirs, 'db-4'):
++ dblib = ['db-4']
+ elif self.compiler.find_library_file(lib_dirs, 'db-3.2'):
+ dblib = ['db-3.2']
elif self.compiler.find_library_file(lib_dirs, 'db-3.1'):
@@ -20,7 +18,7 @@
db185_incs = find_file('db_185.h', inc_dirs,
- ['/usr/include/db3', '/usr/include/db2'])
-+ ['/usr/include/db4.1','/usr/include/db4','/usr/include/db3', '/usr/include/db2'])
++ ['/usr/include/db4','/usr/include/db3', '/usr/include/db2'])
db_inc = find_file('db.h', inc_dirs, ['/usr/include/db1'])
if db185_incs is not None:
exts.append( Extension('bsddb', ['bsddbmodule.c'],
diff --git a/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch b/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch
index 24d22e60659e..021f5226b70c 100644
--- a/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch
+++ b/dev-lang/python/files/python-2.2.3-gentoo_py_dontcompile.patch
@@ -1,27 +1,23 @@
---- Python-2.2.3/Python/import.c 2003-03-23 15:32:56.000000000 +0100
-+++ Python-2.2.3/Python/import.c 2003-10-21 20:15:42.000000000 +0200
+--- Python-2.2.3/Python/import.c 2003-03-23 14:32:56.000000000 +0000
++++ /tmp/import.c 2003-10-09 09:45:51.000000000 +0100
@@ -719,6 +719,7 @@
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
{
FILE *fp;
-+ char *py_dontcompile;
++ char *py_dontcompile;
if (CANT_WRITE(co->co_argcount) ||
CANT_WRITE(co->co_nlocals) ||
-@@ -731,8 +732,14 @@
+@@ -731,8 +732,10 @@
cpathname);
return;
}
-
- fp = open_exclusive(cpathname);
-+ if ((py_dontcompile = getenv("PYTHON_DONTCOMPILE")) == NULL)
-+ fp = open_exclusive(cpathname);
-+ else {
-+ if (Py_VerboseFlag)
-+ PySys_WriteStderr(
-+ "# PYTHON_DONTCOMPILE is set: won't create %s\n", cpathname);
-+ return;
-+ }
++ if ((py_dontcompile = getenv("PYTHON_DONTCOMPILE")) != NULL)
++ fp = open_exclusive(cpathname);
++ else
++ fp = NULL;
if (fp == NULL) {
if (Py_VerboseFlag)
PySys_WriteStderr(
diff --git a/dev-lang/python/files/python-2.4-lib64.patch b/dev-lang/python/files/python-2.4-lib64.patch
index c3e2c4ffcca9..c2b37feb4946 100644
--- a/dev-lang/python/files/python-2.4-lib64.patch
+++ b/dev-lang/python/files/python-2.4-lib64.patch
@@ -1,6 +1,6 @@
-diff -Nru Python-2.4.old/Lib/distutils/command/install.py Lib/distutils/command/install.py
---- Python-2.4.old/Lib/distutils/command/install.py 2004-08-14 21:38:57.318696000 -0400
-+++ Lib/distutils/command/install.py 2004-08-14 21:39:41.285012104 -0400
+diff -Nru Python-2.3.4.old/Lib/distutils/command/install.py Python-2.3.4/Lib/distutils/command/install.py
+--- Python-2.3.4.old/Lib/distutils/command/install.py 2004-08-14 21:38:57.318696000 -0400
++++ Python-2.3.4/Lib/distutils/command/install.py 2004-08-14 21:39:41.285012104 -0400
@@ -39,14 +39,14 @@
INSTALL_SCHEMES = {
'unix_prefix': {
@@ -18,9 +18,9 @@ diff -Nru Python-2.4.old/Lib/distutils/command/install.py Lib/distutils/command/
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
-diff -Nru Python-2.4.old/Lib/distutils/sysconfig.py Lib/distutils/sysconfig.py
---- Python-2.4.old/Lib/distutils/sysconfig.py 2004-08-14 21:38:57.367688552 -0400
-+++ Lib/distutils/sysconfig.py 2004-08-14 21:39:41.300009824 -0400
+diff -Nru Python-2.3.4.old/Lib/distutils/sysconfig.py Python-2.3.4/Lib/distutils/sysconfig.py
+--- Python-2.3.4.old/Lib/distutils/sysconfig.py 2004-08-14 21:38:57.367688552 -0400
++++ Python-2.3.4/Lib/distutils/sysconfig.py 2004-08-14 21:39:41.300009824 -0400
@@ -99,8 +99,12 @@
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -35,27 +35,46 @@ diff -Nru Python-2.4.old/Lib/distutils/sysconfig.py Lib/distutils/sysconfig.py
if standard_lib:
return libpython
else:
-diff -Nru Lib/site.py.old Lib/site.py
---- Lib/site.py.old 2005-01-05 10:50:32.642936080 -0800
-+++ Lib/site.py 2005-01-05 10:54:44.698617792 -0800
-@@ -179,9 +179,14 @@
- sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
- elif os.sep == '/':
- sitedirs = [os.path.join(prefix,
-+ "lib64",
-+ "python" + sys.version[:3],
-+ "site-packages"),
-+ os.path.join(prefix,
- "lib",
- "python" + sys.version[:3],
- "site-packages"),
-+ os.path.join(prefix, "lib64", "site-python"),
- os.path.join(prefix, "lib", "site-python")]
- sitedirs = [os.path.join(prefix,"lib","portage","pym")] + sitedirs
- else:
-diff -Nru Python-2.4.old/Makefile.pre.in Makefile.pre.in
---- Python-2.4.old/Makefile.pre.in 2004-08-14 21:39:00.506211424 -0400
-+++ Makefile.pre.in 2004-08-14 21:39:41.341003592 -0400
+diff -Nru Python-2.3.4.old/Lib/site.py Python-2.3.4/Lib/site.py
+--- Python-2.3.4.old/Lib/site.py 2004-08-14 21:38:57.565658456 -0400
++++ Python-2.3.4/Lib/site.py 2004-08-14 21:39:41.318007088 -0400
+@@ -166,9 +166,14 @@
+ sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
+ elif os.sep == '/':
+ sitedirs = [os.path.join(prefix,
++ "lib64",
++ "python" + sys.version[:3],
++ "site-packages"),
++ os.path.join(prefix,
+ "lib",
+ "python" + sys.version[:3],
+ "site-packages"),
++ os.path.join(prefix, "lib64", "site-python"),
+ os.path.join(prefix, "lib", "site-python")]
+ else:
+ sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
+diff -Nru Python-2.3.4.old/Lib/test/test_re.py Python-2.3.4/Lib/test/test_re.py
+--- Python-2.3.4.old/Lib/test/test_re.py 2004-08-14 21:38:56.631800424 -0400
++++ Python-2.3.4/Lib/test/test_re.py 2004-08-14 21:39:34.240083096 -0400
+@@ -497,6 +497,15 @@
+ self.assert_(re.compile('bug_926075') is not
+ re.compile(eval("u'bug_926075'")))
+
++ def test_bug_931848(self):
++ try:
++ unicode
++ except NameError:
++ pass
++ pattern = eval('u"[\u002E\u3002\uFF0E\uFF61]"')
++ self.assertEqual(re.compile(pattern).split("a.b.c"),
++ ['a','b','c'])
++
+ def run_re_tests():
+ from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
+ if verbose:
+diff -Nru Python-2.3.4.old/Makefile.pre.in Python-2.3.4/Makefile.pre.in
+--- Python-2.3.4.old/Makefile.pre.in 2004-08-14 21:39:00.506211424 -0400
++++ Python-2.3.4/Makefile.pre.in 2004-08-14 21:39:41.341003592 -0400
@@ -79,11 +79,11 @@
# Expanded directories
@@ -70,19 +89,19 @@ diff -Nru Python-2.4.old/Makefile.pre.in Makefile.pre.in
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
-diff -Nru Python-2.4.old/Modules/getpath.c Modules/getpath.c
---- Modules/Setup.dist.old 2005-01-05 11:59:12.421634520 -0800
-+++ Modules/Setup.dist 2005-01-05 12:00:58.292539696 -0800
-@@ -325,7 +325,7 @@
+diff -Nru Python-2.3.4.old/Modules/Setup.dist Python-2.3.4/Modules/Setup.dist
+--- Python-2.3.4.old/Modules/Setup.dist 2004-08-14 21:39:00.761172664 -0400
++++ Python-2.3.4/Modules/Setup.dist 2004-08-14 21:42:09.073544832 -0400
+@@ -343,7 +343,7 @@
# *** Uncomment and edit to reflect your Tcl/Tk versions:
# -ltk8.2 -ltcl8.2 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-# -L/usr/X11R6/lib \
-+ -L/usr/X11R6/lib64 \
++ -L/usr/X11R6/lib64 \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
-@@ -396,7 +396,7 @@
+@@ -417,7 +417,7 @@
#DB=/usr/local/BerkeleyDB.4.0
#DBLIBVER=4.0
#DBINC=$(DB)/include
@@ -91,17 +110,18 @@ diff -Nru Python-2.4.old/Modules/getpath.c Modules/getpath.c
#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
# Historical Berkeley DB 1.85
-@@ -442,7 +442,7 @@
+@@ -463,7 +463,7 @@
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
- # See http://www.gzip.org/zlib/
+ # See http://www.cdrom.com/pub/infozip/zlib/
-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
# Interface to the Expat XML parser
#
---- Python-2.4.old/Modules/getpath.c 2004-08-14 21:39:00.750174336 -0400
-+++ Modules/getpath.c 2004-08-14 21:39:41.319006936 -0400
+diff -Nru Python-2.3.4.old/Modules/getpath.c Python-2.3.4/Modules/getpath.c
+--- Python-2.3.4.old/Modules/getpath.c 2004-08-14 21:39:00.750174336 -0400
++++ Python-2.3.4/Modules/getpath.c 2004-08-14 21:39:41.319006936 -0400
@@ -112,8 +112,8 @@
#endif
@@ -139,20 +159,29 @@ diff -Nru Python-2.4.old/Modules/getpath.c Modules/getpath.c
+ joinpath(exec_prefix, "lib64/lib-dynload");
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
-
-diff -Nru setup.py.old setup.py
---- setup.py.old 2005-01-05 12:05:34.809502728 -0800
-+++ setup.py 2005-01-05 12:14:29.522214040 -0800
-@@ -247,7 +247,7 @@
+
+diff -Nru Python-2.3.4.old/setup.py Python-2.3.4/setup.py
+--- Python-2.3.4.old/setup.py 2004-08-14 21:39:00.575200936 -0400
++++ Python-2.3.4/setup.py 2004-08-14 21:39:41.340003744 -0400
+@@ -241,7 +241,7 @@
+
def detect_modules(self):
- global disable_ssl
# Ensure that /usr/local is always used
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- # Add paths to popular package managers on OS X/darwin
-@@ -437,11 +437,11 @@
+ # fink installs lots of goodies in /sw/... - make sure we
+@@ -264,7 +264,7 @@
+ # lib_dirs and inc_dirs are used to search for files;
+ # if a file is found in one of those directories, it can
+ # be assumed that no additional -I,-L directives are needed.
+- lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib']
++ lib_dirs = self.compiler.library_dirs + ['/lib64', '/usr/lib64']
+ inc_dirs = self.compiler.include_dirs + ['/usr/include']
+ exts = []
+
+@@ -413,11 +413,11 @@
elif self.compiler.find_library_file(lib_dirs, 'curses'):
readline_libs.append('curses')
elif self.compiler.find_library_file(lib_dirs +
@@ -165,8 +194,8 @@ diff -Nru setup.py.old setup.py
+ library_dirs=['/usr/lib64/termcap'],
libraries=readline_libs) )
if platform not in ['mac']:
- # crypt module.
-@@ -470,8 +470,8 @@
+ # crypt module.
+@@ -446,8 +446,8 @@
if krb5_h:
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
@@ -177,7 +206,7 @@ diff -Nru setup.py.old setup.py
] )
if (ssl_incs is not None and
-@@ -502,23 +502,23 @@
+@@ -481,12 +481,12 @@
# order you wish to search - e.g., search for db4 before db3
db_try_this = {
'db4': {'libs': ('db-4.2', 'db42', 'db-4.1', 'db41', 'db-4.0', 'db4',),
@@ -191,28 +220,35 @@ diff -Nru setup.py.old setup.py
+ '/usr/local/lib64',
'/opt/sfw',
- '/sw/lib',
-+ '/sw/libi64',
++ '/sw/lib64',
),
- 'incdirs': ('/usr/include/db4.2',
- '/usr/include/db4.1',
+ 'incdirs': ('/usr/local/BerkeleyDB.4.2/include',
+ '/usr/local/include/db42',
+@@ -499,12 +499,12 @@
'/usr/include/db4',
)},
- 'db3': {'libs': ('db-3.3', 'db-3.2', 'db3',),
+ 'db3': {'libs': ('db-3.3', 'db-3.2', 'db-3.1', 'db3',),
- 'libdirs': ('/usr/local/BerkeleyDB.3.3/lib',
- '/usr/local/BerkeleyDB.3.2/lib',
+- '/usr/local/BerkeleyDB.3.1/lib',
- '/usr/local/lib',
- '/opt/sfw/lib',
- '/sw/lib',
+ 'libdirs': ('/usr/local/BerkeleyDB.3.3/lib64',
+ '/usr/local/BerkeleyDB.3.2/lib64',
++ '/usr/local/BerkeleyDB.3.1/lib64',
+ '/usr/local/lib64',
+ '/opt/sfw/lib64',
+ '/sw/lib64',
),
'incdirs': ('/usr/local/BerkeleyDB.3.3/include',
'/usr/local/BerkeleyDB.3.2/include',
-@@ -1000,11 +1000,11 @@
- added_lib_dirs.append('/usr/X11R6/lib')
+@@ -986,14 +986,14 @@
+ added_lib_dirs.append('/usr/openwin/lib')
+ elif os.path.exists('/usr/X11R6/include'):
+ include_dirs.append('/usr/X11R6/include')
+- added_lib_dirs.append('/usr/X11R6/lib')
++ added_lib_dirs.append('/usr/X11R6/lib64')
elif os.path.exists('/usr/X11R5/include'):
include_dirs.append('/usr/X11R5/include')
- added_lib_dirs.append('/usr/X11R5/lib')
diff --git a/dev-lang/python/files/python-2.4-libdir.patch b/dev-lang/python/files/python-2.4-libdir.patch
index d60605c4416d..61ca31f58a53 100644
--- a/dev-lang/python/files/python-2.4-libdir.patch
+++ b/dev-lang/python/files/python-2.4-libdir.patch
@@ -35,9 +35,10 @@ diff -Naurp Python-2.4.orig/Lib/distutils/sysconfig.py Python-2.4/Lib/distutils/
if standard_lib:
return libpython
else:
---- ./Lib/site.py 2005-03-17 09:55:19.295156312 -0800
-+++ ./orgLib/site.py 2005-03-17 09:59:42.009217704 -0800
-@@ -179,10 +179,20 @@
+diff -Naurp Python-2.4.orig/Lib/site.py Python-2.4/Lib/site.py
+--- Python-2.4.orig/Lib/site.py 2004-07-19 19:28:28.000000000 -0700
++++ Python-2.4/Lib/site.py 2005-02-07 12:17:13.000000000 -0800
+@@ -179,9 +179,14 @@ def addsitepackages(known_paths):
sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
elif os.sep == '/':
sitedirs = [os.path.join(prefix,
@@ -48,14 +49,8 @@ diff -Naurp Python-2.4.orig/Lib/distutils/sysconfig.py Python-2.4/Lib/distutils/
"lib",
"python" + sys.version[:3],
"site-packages"),
-+ os.path.join(prefix, "lib64", "site-python"),
++ os.path.join(prefix, "lib64", "site-python"),
os.path.join(prefix, "lib", "site-python")]
-+ tmp_sitedirs = []
-+ for sdir in sitedirs:
-+ if sdir not in tmp_sitedirs:
-+ tmp_sitedirs.append(sdir)
-+ sitedirs = tmp_sitedirs
- sitedirs = [os.path.join(prefix,"lib","portage","pym")] + sitedirs
else:
sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
diff -Naurp Python-2.4.orig/Makefile.pre.in Python-2.4/Makefile.pre.in
diff --git a/dev-lang/python/files/python-2.4-readline.patch b/dev-lang/python/files/python-2.4-readline.patch
index 7469b577979c..3dbeb8e02727 100644
--- a/dev-lang/python/files/python-2.4-readline.patch
+++ b/dev-lang/python/files/python-2.4-readline.patch
@@ -1,3 +1,19 @@
+Common subdirectories: Python-2.4/Demo and Python-2.4.new/Demo
+Common subdirectories: Python-2.4/Doc and Python-2.4.new/Doc
+Common subdirectories: Python-2.4/Grammar and Python-2.4.new/Grammar
+Common subdirectories: Python-2.4/Include and Python-2.4.new/Include
+Common subdirectories: Python-2.4/Lib and Python-2.4.new/Lib
+Common subdirectories: Python-2.4/Mac and Python-2.4.new/Mac
+Common subdirectories: Python-2.4/Misc and Python-2.4.new/Misc
+Common subdirectories: Python-2.4/Modules and Python-2.4.new/Modules
+Common subdirectories: Python-2.4/Objects and Python-2.4.new/Objects
+Common subdirectories: Python-2.4/PC and Python-2.4.new/PC
+Common subdirectories: Python-2.4/PCbuild and Python-2.4.new/PCbuild
+Common subdirectories: Python-2.4/Parser and Python-2.4.new/Parser
+Common subdirectories: Python-2.4/Python and Python-2.4.new/Python
+Common subdirectories: Python-2.4/RISCOS and Python-2.4.new/RISCOS
+Common subdirectories: Python-2.4/Tools and Python-2.4.new/Tools
+Only in Python-2.4.new: autom4te.cache
diff -up Python-2.4/configure Python-2.4.new/configure
--- Python-2.4/configure 2004-11-07 01:24:12.000000000 +0000
+++ Python-2.4.new/configure 2005-04-20 17:35:32.380494843 +0100
diff --git a/dev-lang/python/files/python-2.4.1-libdir.patch b/dev-lang/python/files/python-2.4.1-libdir.patch
index b9d6b50395d5..4a11d1e8514b 100644
--- a/dev-lang/python/files/python-2.4.1-libdir.patch
+++ b/dev-lang/python/files/python-2.4.1-libdir.patch
@@ -1,5 +1,6 @@
---- Python-2.4.1/Lib/distutils/command/install.py
-+++ Python-2.4.1/Lib/distutils/command/install.py
+diff -Naurp Python-2.4.orig/Lib/distutils/command/install.py Python-2.4/Lib/distutils/command/install.py
+--- Python-2.4.orig/Lib/distutils/command/install.py 2004-11-10 14:23:15.000000000 -0800
++++ Python-2.4/Lib/distutils/command/install.py 2005-02-07 12:13:14.000000000 -0800
@@ -39,14 +39,14 @@ else:
INSTALL_SCHEMES = {
'unix_prefix': {
@@ -17,8 +18,9 @@
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
---- Python-2.4.1/Lib/distutils/sysconfig.py
-+++ Python-2.4.1/Lib/distutils/sysconfig.py
+diff -Naurp Python-2.4.orig/Lib/distutils/sysconfig.py Python-2.4/Lib/distutils/sysconfig.py
+--- Python-2.4.orig/Lib/distutils/sysconfig.py 2004-10-13 08:54:16.000000000 -0700
++++ Python-2.4/Lib/distutils/sysconfig.py 2005-02-07 12:16:17.000000000 -0800
@@ -99,8 +99,12 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
@@ -33,9 +35,9 @@
if standard_lib:
return libpython
else:
---- Python-2.4.1/Lib/site.py
-+++ Python-2.4.1/Lib/site.py
-@@ -179,10 +179,20 @@ def addsitepackages(known_paths):
+--- ./Lib/site.py 2005-03-17 09:55:19.295156312 -0800
++++ ./orgLib/site.py 2005-03-17 09:59:42.009217704 -0800
+@@ -179,10 +179,20 @@
sitedirs = [os.path.join(prefix, "Lib", "site-packages")]
elif os.sep == '/':
sitedirs = [os.path.join(prefix,
@@ -56,8 +58,9 @@
sitedirs = [os.path.join(prefix,"lib","portage","pym")] + sitedirs
else:
sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
---- Python-2.4.1/Makefile.pre.in
-+++ Python-2.4.1/Makefile.pre.in
+diff -Naurp Python-2.4.orig/Makefile.pre.in Python-2.4/Makefile.pre.in
+--- Python-2.4.orig/Makefile.pre.in 2004-09-26 10:26:55.000000000 -0700
++++ Python-2.4/Makefile.pre.in 2005-02-07 12:18:39.000000000 -0800
@@ -79,7 +79,7 @@ exec_prefix= @exec_prefix@
# Expanded directories
@@ -67,9 +70,10 @@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
---- Python-2.4.1/Modules/Setup.dist
-+++ Python-2.4.1/Modules/Setup.dist
-@@ -329,7 +329,7 @@ GLHACK=-Dclear=__GLclear
+diff -Naurp Python-2.4.orig/Modules/Setup.dist Python-2.4/Modules/Setup.dist
+--- Python-2.4.orig/Modules/Setup.dist 2004-08-31 06:50:12.000000000 -0700
++++ Python-2.4/Modules/Setup.dist 2005-02-07 12:19:48.000000000 -0800
+@@ -325,7 +325,7 @@ GLHACK=-Dclear=__GLclear
# *** Uncomment and edit to reflect your Tcl/Tk versions:
# -ltk8.2 -ltcl8.2 \
# *** Uncomment and edit to reflect where your X11 libraries are:
@@ -78,7 +82,7 @@
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
-@@ -400,7 +400,7 @@ GLHACK=-Dclear=__GLclear
+@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear
#DB=/usr/local/BerkeleyDB.4.0
#DBLIBVER=4.0
#DBINC=$(DB)/include
@@ -87,17 +91,18 @@
#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
# Historical Berkeley DB 1.85
-@@ -446,7 +446,7 @@ GLHACK=-Dclear=__GLclear
+@@ -442,7 +442,7 @@ GLHACK=-Dclear=__GLclear
# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/
-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-+#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
++zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/@@GENTOO_LIBDIR@@ -lz
# Interface to the Expat XML parser
#
---- Python-2.4.1/Modules/getpath.c
-+++ Python-2.4.1/Modules/getpath.c
+diff -Naurp Python-2.4.orig/Modules/getpath.c Python-2.4/Modules/getpath.c
+--- Python-2.4.orig/Modules/getpath.c 2004-08-07 18:00:47.000000000 -0700
++++ Python-2.4/Modules/getpath.c 2005-02-07 12:22:15.137580048 -0800
@@ -113,7 +113,7 @@
#ifndef PYTHONPATH
@@ -107,42 +112,7 @@
#endif
#ifndef LANDMARK
-@@ -125,6 +125,7 @@ static char exec_prefix[MAXPATHLEN+1];
- static char progpath[MAXPATHLEN+1];
- static char *module_search_path = NULL;
- static char lib_python[] = "lib/python" VERSION;
-+static char lib_exec_python[] = "@@GENTOO_LIBDIR@@/python" VERSION;
-
- static void
- reduce(char *dir)
-@@ -321,7 +322,7 @@ search_for_exec_prefix(char *argv0_path,
- strncpy(exec_prefix, delim+1, MAXPATHLEN);
- else
- strncpy(exec_prefix, home, MAXPATHLEN);
-- joinpath(exec_prefix, lib_python);
-+ joinpath(exec_prefix, lib_exec_python);
- joinpath(exec_prefix, "lib-dynload");
- return 1;
- }
-@@ -338,7 +339,7 @@ search_for_exec_prefix(char *argv0_path,
- copy_absolute(exec_prefix, argv0_path);
- do {
- n = strlen(exec_prefix);
-- joinpath(exec_prefix, lib_python);
-+ joinpath(exec_prefix, lib_exec_python);
- joinpath(exec_prefix, "lib-dynload");
- if (isdir(exec_prefix))
- return 1;
-@@ -348,7 +349,7 @@ search_for_exec_prefix(char *argv0_path,
-
- /* Look at configure's EXEC_PREFIX */
- strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
-- joinpath(exec_prefix, lib_python);
-+ joinpath(exec_prefix, lib_exec_python);
- joinpath(exec_prefix, "lib-dynload");
- if (isdir(exec_prefix))
- return 1;
-@@ -525,7 +526,7 @@ calculate_path(void)
+@@ -525,7 +525,7 @@ calculate_path(void)
fprintf(stderr,
"Could not find platform dependent libraries <exec_prefix>\n");
strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
@@ -151,8 +121,17 @@
}
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
---- Python-2.4.1/setup.py
-+++ Python-2.4.1/setup.py
+diff -Naurp Python-2.4.orig/setup.py Python-2.4/setup.py
+--- Python-2.4.orig/setup.py 2005-02-07 12:11:30.000000000 -0800
++++ Python-2.4/setup.py 2005-02-07 12:25:21.746978894 -0800
+@@ -248,6 +248,7 @@ class PyBuildExt(build_ext):
+ global disable_ssl
+ # Ensure that /usr/local is always used
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/@@GENTOO_LIBDIR@@')
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+
+ # Add paths to popular package managers on OS X/darwin
@@ -274,7 +275,7 @@ class PyBuildExt(build_ext):
# if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed.
@@ -176,7 +155,7 @@
libraries=readline_libs) )
if platform not in ['mac']:
# crypt module.
-@@ -1015,7 +1016,7 @@ class PyBuildExt(build_ext):
+@@ -996,7 +997,7 @@ class PyBuildExt(build_ext):
added_lib_dirs.append('/usr/openwin/lib')
elif os.path.exists('/usr/X11R6/include'):
include_dirs.append('/usr/X11R6/include')
diff --git a/dev-lang/python/files/python-config-2.2 b/dev-lang/python/files/python-config-2.2
index 056b27125ae9..253285032259 100644
--- a/dev-lang/python/files/python-config-2.2
+++ b/dev-lang/python/files/python-config-2.2
@@ -1,3 +1,3 @@
#!/usr/bin/python
import distutils.sysconfig, string
-print "-lpython2.2 -lm -L/usr/lib/python2.2/config",string.join(string.split(distutils.sysconfig.get_config_var("MODLIBS")))
+print "-lpython2.2",string.join(string.split(distutils.sysconfig.get_config_var("MODLIBS")))
diff --git a/dev-lang/python/files/python-config-2.2.1 b/dev-lang/python/files/python-config-2.2.1
index 056b27125ae9..2bcfdae49fb8 100644
--- a/dev-lang/python/files/python-config-2.2.1
+++ b/dev-lang/python/files/python-config-2.2.1
@@ -1,3 +1,3 @@
#!/usr/bin/python
import distutils.sysconfig, string
-print "-lpython2.2 -lm -L/usr/lib/python2.2/config",string.join(string.split(distutils.sysconfig.get_config_var("MODLIBS")))
+print "-lpython2.2 -L /usr/lib/python2.2/config",string.join(string.split(distutils.sysconfig.get_config_var("MODLIBS")))
diff --git a/dev-lang/python/files/python-updater b/dev-lang/python/files/python-updater
index ca6ef7d4364e..95662876e54f 100644
--- a/dev-lang/python/files/python-updater
+++ b/dev-lang/python/files/python-updater
@@ -21,11 +21,13 @@
# PKGS_MASKED = list of packages that are installed, but masked.
#
+OLD_PY_VER=2.2
NEW_PY_VER=$(python -V 2>&1 | sed 's:Python ::' | cut -d. -f1-2)
+OLD_MODULES_DIR=/usr/lib/python${OLD_PY_VER}
-PKGS_EXCEPTIONS="dev-lang/python sys-apps/portage"
+PKGS_EXCEPTIONS="dev-lang/python"
PKGS_MANUAL="app-office/gnumeric app-office/dia x11-libs/vte"
-LOGFILE="/var/log/python-updater.log"
+LOGFILE="/tmp/python-updater.log"
# portage variables
PKG_DBDIR=/var/db/pkg
@@ -35,31 +37,12 @@ PORTDIR_OVERLAYS=`portageq portdir_overlay`
PRETEND=0
PKGS_TO_REMERGE=""
PKGS_COUNT_REMERGE=0
-PORTAGE_PYTHON="/usr/bin/python"
# load the gentoo-style info macros, but hack to get around
# it thinking this is an rc script
EBUILD="1"
source /sbin/functions.sh
-
-
-for old in 2.4 2.3 2.2 2.1; do
- if [ "${old}" != "${NEW_PY_VER}" ]; then
- if [ -e /usr/bin/python${old} ] ; then
- OLD_PY_VER=${old}
- break;
- fi
- fi
-done
-
-
-if [ -z "${OLD_PY_VER}" ] ; then
- eerror "Can't determine any previous Python version(s)."
- exit 1
-fi
-
-
# misc helper functions
eloginfo() {
einfo $*
@@ -77,88 +60,34 @@ elogecho() {
elogerr() {
eerror $*
DATESTRING=`date +"%Y/%m/%d %H:%M:%S"`
- echo "${DATESTRING} ! ${*}" >> ${LOGFILE}
+ echo "${DATESTRING} ! ${*}" >> ${LOGFILE}
}
elog() {
DATESTRING=`date +"%Y/%m/%d %H:%M:%S"`
- echo "${DATESTRING} - ${*}" >> ${LOGFILE}
-}
-
-
-usage() {
- echo "usage: python-updater [-h|-p|-o X.X|-n X.X]"
- echo " -h help"
- echo " -p pretend (don't do anything)"
- echo " -o X.X set old python version to upgrade from [default: ${OLD_PY_VER}]"
- echo " -n X.X set new python version to upgrade to [default: ${NEW_PY_VER}]"
+ echo "${DATESTRING} - ${*}" >> ${LOGFILE}
}
-#
-# Sanity check
-#
-
-if [ -z "${PORTDIR}" ]; then
- eerror "Unable to proceed. Can not find PORTDIR. Make sure the command:"
- eerror " "
- eerror " portageq portdir"
- eerror " "
- eerror "returns a value. If it doesn't, make sure you have updated to"
- eerror "latest portage version."
- eerror " "
- eerror "Report bugs to http://bugs.gentoo.org/"
- exit 1
-fi
-
-if [ ! -f ${LOGFILE} ]; then
- if ! touch ${LOGFILE} 2>&1 > /dev/null; then
- ewarn "Logging disabled due to permissions"
- LOGFILE=/dev/null
- fi
-elif [ ! -w ${LOGFILE} -o ! -L ${LOGFILE} ]; then
- ewarn "Logging disabled due to permissions"
- LOGFILE=/dev/null
-fi
-
#
#
# Command Line Parsing
#
#
-while [ -n "$1" ]; do
+
+if [ -n "$1" ]; then
case "$1" in
- -h)
- usage
- exit 0
+ -h)
+ echo "usage: python-updater [-h|-p]"
+ echo " -h help"
+ echo " -p pretend (don't do anything)"
;;
-p)
PRETEND=1
;;
- -o)
- shift
- OLD_PY_VER="$1"
- ;;
- -n)
- shift
- NEW_PY_VER="$1"
- ;;
*)
- usage
- echo "unrecognised option: $1"
;;
esac
- shift
-done
-
-#
-# Test where portage is, in python2.2 or somewhere else?
-#
-for py in /usr/bin/python /usr/bin/python${OLD_PY_VER} /usr/bin/python${NEW_PY_VER}; do
- if ${py} -c "import portage"; then
- PORTAGE_PYTHON=${py}
- break;
- fi
-done
+fi
#
#
@@ -166,11 +95,9 @@ done
# /usr/lib/python${OLD_PY_VER}
#
#
-OLD_MODULES_DIRS="/usr/lib/python${OLD_PY_VER} /usr/lib32/python${OLD_PY_VER} /usr/lib64/python${OLD_PY_VER}"
-OLD_INCLUDE_DIR=/usr/include/python${OLD_PY_VER}
eloginfo "Starting Python Updater from ${OLD_PY_VER} to ${NEW_PY_VER} :"
-eloginfo "Searching for packages with files in ${OLD_MODULES_DIRS} .."
+eloginfo "Searching for packages with files in ${OLD_MODULES_DIR} .."
# iterate thru all the installed package's contents
for content in `find ${PKG_DBDIR} -name CONTENTS`; do
@@ -190,14 +117,10 @@ for content in `find ${PKG_DBDIR} -name CONTENTS`; do
continue;
fi
- for OLD_MODULES_DIR in ${OLD_MODULES_DIRS}; do
- if fgrep "${OLD_MODULES_DIR}" ${content} > /dev/null; then
- PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}"
- elogecho "Adding to list: ${CATPKGVER}"
- elif fgrep "${OLD_INCLUDE_DIR}" ${content} > /dev/null; then
- PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}"
- fi
- done
+ if fgrep "${OLD_MODULES_DIR}" ${content} > /dev/null; then
+ PKGS_TO_REMERGE="${PKGS_TO_REMERGE} ${CATPKGVER}"
+ elogecho "Adding to list: ${CATPKGVER}"
+ fi
done
# now we have to do each emerge seperately because if an installed version
@@ -227,14 +150,19 @@ for pkg in ${PKGS_TO_REMERGE}; do
done
#
-# Use my super dumb package reordering algorithm that works most of the time
+# Check the actual order which these should be merged (probably doesn't work)
#
eloginfo "Re-ordering packages to merge .."
-PKGS_OK_SORTED="$(${PORTAGE_PYTHON} ${PORTDIR}/dev-lang/python/files/depreorder.py ${PKGS_OK} | xargs)"
+PKGS_OK_SORTED_CMD="emerge -p "
+for pkg in $PKGS_OK; do
+ PKGS_OK_SORTED_CMD="${PKGS_OK_SORTED_CMD} =$pkg"
+done
+PKGS_OK_SORTED_CMD="${PKGS_OK_SORTED_CMD}"
eloginfo "Preparing to merge these packages in this order:"
+PKGS_OK_SORTED="`${PKGS_OK_SORTED_CMD} | grep ebuild | sed 's:\[ebuild.*\] ::'`"
for pkg in $PKGS_OK_SORTED; do
elogecho "$pkg"
done
@@ -245,7 +173,7 @@ done
COUNT=1
PKGS_FAILED=""
if [ "${PRETEND}" != "1" ]; then
- for pkg in ${PKGS_OK_SORTED}; do
+ for pkg in ${PKGS_OK}; do
eloginfo "Starting to merge ($COUNT/$PKGS_COUNT_REMERGE) $pkg .."
if ! emerge --oneshot --nodeps =$pkg; then
PKGS_FAILED="${PKGS_FAILED} $pkg"
@@ -264,42 +192,39 @@ OUTPUT_PKGS_FAILED=""
for pkg in ${PKGS_FAILED}; do OUTPUT_PKGS_FAILED="${OUTPUT_PKGS_FAILED} \=$pkg"; done
if [ -n "${PKGS_FAILED}" -o -n "${PKGS_MISSING}" -o -n "${PKGS_MASKED}" ]; then
- echo
ewarn "************************************************************"
ewarn "* Packages that still need to be manually emerged : *"
ewarn "************************************************************"
if [ -n "${OUTPUT_PKGS_MASKED}" ]; then
- echo
ewarn " Masked Packages:"
ewarn " ----------------"
ewarn " Unmask the following packages (at your own risk) and "
ewarn " emerge them using this command after removing the '-p'"
ewarn " parameter."
- echo
+ ewarn ""
ewarn " emerge -p ${OUTPUT_PKGS_MASKED}"
- echo
+ ewarn ""
fi
if [ -n "${OUTPUT_PKGS_MISSING}" ]; then
- echo
ewarn " Missing Packages:"
ewarn " -----------------"
ewarn " These packages need to be updated because their versions do"
ewarn " not exist in portage anymore."
- echo
+ ewarn ""
for x in ${OUTPUT_PKGS_MISSING}; do
echo " ${x}"
done
+ ewarn ""
fi
if [ -n "${OUTPUT_PKGS_FAILED}" ]; then
- echo
ewarn " Failed Packaged:"
ewarn " ----------------"
ewarn " These packages have failed and need to be re-emerged again."
ewarn " Alternatively, try re-running this script again to see if it"
ewarn " can be fixed."
- echo
+ ewarn ""
ewarn " emerge -p ${OUTPUT_PKGS_FAILED}"
- echo
+ ewarn ""
fi
elog "Python update completed with errors."
@@ -319,4 +244,3 @@ if [ -n "${PKGS_FAILED}" -o -n "${PKGS_MISSING}" -o -n "${PKGS_MASKED}" ]; then
else
eloginfo "Python update completed successfully."
fi
-