summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2007-10-06 08:11:29 +0000
committerGregory P. Smith <greg@mad-scientist.com>2007-10-06 08:11:29 +0000
commitbfcba7a651cf68d7e967bf485ff983545379a115 (patch)
tree33f3377fb977894139ad84e009cf3ac076cf5481
parent8c71194b6ea4f0274169449503746c4880932132 (diff)
downloadcpython-bfcba7a651cf68d7e967bf485ff983545379a115.tar.gz
Backport 58344: allow BerkeleyDB 4.6.x >= 4.6.21 for the bsddb module
-rw-r--r--setup.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index da662eb1f2..a1713e8e15 100644
--- a/setup.py
+++ b/setup.py
@@ -600,10 +600,11 @@ class PyBuildExt(build_ext):
# implementation independent wrapper for these; dumbdbm.py provides
# similar functionality (but slower of course) implemented in Python.
- # Sleepycat 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 DB code. The supported versions
- # are set below. Visit http://www.sleepycat.com/ to download
+ # This requires the Sleepycat^WOracle DB code. The supported versions
+ # are set below. Visit the URL above to download
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
@@ -675,6 +676,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