Signed-off-By: Jeff Schroeder This patch is the necessary secret sauce for getting Python 2.5.1 from Fedora 9+ to build on an older CentOS 5 or RHEL5 host --- Python-2.5.1/setup.py.orig 2008-12-04 07:25:07.000000000 -0800 +++ Python-2.5.1/setup.py 2008-12-04 07:25:27.000000000 -0800 @@ -606,7 +606,7 @@ # a release. Most open source OSes come with one or more # versions of BerkeleyDB already installed. - max_db_ver = (4, 6) + max_db_ver = (4, 3) min_db_ver = (3, 3) db_setup_debug = True # verbose debug prints from this script? @@ -623,7 +623,7 @@ '/sw/include/db3', ] # 4.x minor number specific paths - for x in (0,1,2,3,4,5,6): + for x in (0,1,2,3): db_inc_paths.append('/usr/include/db4%d' % x) db_inc_paths.append('/usr/include/db4.%d' % x) db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x) @@ -646,7 +646,7 @@ for dn in inc_dirs: std_variants.append(os.path.join(dn, 'db3')) std_variants.append(os.path.join(dn, 'db4')) - for x in (0,1,2,3,4,5,6): + for x in (0,1,2,3): std_variants.append(os.path.join(dn, "db4%d"%x)) std_variants.append(os.path.join(dn, "db4.%d"%x)) for x in (2,3): --- Python-2.5.1/Modules/Setup.dist.orig 2008-12-04 06:47:58.000000000 -0800 +++ Python-2.5.1/Modules/Setup.dist 2008-12-04 06:47:50.000000000 -0800 @@ -402,7 +402,7 @@ # # Edit the variables DB and DBLIBVERto point to the db top directory # and the subdirectory of PORT where you built it. -DBLIBVER=4.6 +DBLIBVER=4.3 DBINC=/usr/include/db4 DBLIB=/usr/lib _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)