summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2007-10-06 07:51:59 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2007-10-06 07:51:59 (GMT)
commit1475cd876190ccad16e47600958b226bfd788332 (patch)
tree714a03838e235f6b6a325a60b598857ba9c27d11 /setup.py
parente70be5cbb936c6b9e3b54f9a5ff3570f52f59bab (diff)
downloadcpython-1475cd876190ccad16e47600958b226bfd788332.zip
cpython-1475cd876190ccad16e47600958b226bfd788332.tar.gz
cpython-1475cd876190ccad16e47600958b226bfd788332.tar.bz2
Allows BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index 1a7ce26..6df10cc 100644
--- a/setup.py
+++ b/setup.py
@@ -656,16 +656,15 @@ class PyBuildExt(build_ext):
# implementation independent wrapper for these; dumbdbm.py provides
# similar functionality (but slower of course) implemented in Python.
- # Sleepycat^WOracle Berkeley DB interface. http://www.sleepycat.com
+ # Sleepycat^WOracle Berkeley DB interface.
+ # http://www.oracle.com/database/berkeley-db/db/index.html
#
# This requires the Sleepycat^WOracle DB code. The supported versions
# are set below. Visit http://www.sleepycat.com/ to download
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
- # XXX(gps) - Do not allow BerkeleyDB 4.6.x until Oracle fixes
- # the DB_HASH lockup bug that is present in 4.6.19.
- max_db_ver = (4, 5)
+ max_db_ver = (4, 6)
min_db_ver = (3, 3)
db_setup_debug = False # verbose debug prints from this script?
@@ -736,6 +735,15 @@ class PyBuildExt(build_ext):
db_minor = int(m.group(1))
db_ver = (db_major, db_minor)
+ # Avoid 4.6 prior to 4.6.21 due to a BerkeleyDB bug
+ if db_ver == (4, 6):
+ m = re.search(r"#define\WDB_VERSION_PATCH\W(\d+)", f)
+ db_patch = int(m.group(1))
+ if db_patch < 21:
+ print "db.h:", db_ver, "patch", db_patch,
+ print "being ignored (4.6.x must be >= 4.6.21)"
+ continue
+
if ( (not db_ver_inc_map.has_key(db_ver)) and
(db_ver <= max_db_ver and db_ver >= min_db_ver) ):
# save the include directory with the db.h version