diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-08-12 18:39:44 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-08-12 18:39:44 (GMT) |
commit | 606bbc9b9f25b02bca1e7224976d55f8f6ccc616 (patch) | |
tree | 89affb6d0b757f8e1aa0e29a3b4b558e5126885a /setup.py | |
parent | 992d3d1454f2c9ce34cfa15652c1a773ccd220a7 (diff) | |
download | cpython-606bbc9b9f25b02bca1e7224976d55f8f6ccc616.zip cpython-606bbc9b9f25b02bca1e7224976d55f8f6ccc616.tar.gz cpython-606bbc9b9f25b02bca1e7224976d55f8f6ccc616.tar.bz2 |
Merged revisions 74356-74357 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r74356 | benjamin.peterson | 2009-08-12 13:11:03 -0500 (Wed, 12 Aug 2009) | 1 line
fix typo in c++ ifdef
........
r74357 | benjamin.peterson | 2009-08-12 13:18:03 -0500 (Wed, 12 Aug 2009) | 1 line
search through db.h in binary #6680
........
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -725,17 +725,17 @@ class PyBuildExt(build_ext): f = os.path.join(d, "db.h") if db_setup_debug: print("db: looking for db.h in", f) if os.path.exists(f): - f = open(f).read() - m = re.search(r"#define\WDB_VERSION_MAJOR\W(\d+)", f) + f = open(f, "rb").read() + m = re.search(br"#define\WDB_VERSION_MAJOR\W(\d+)", f) if m: db_major = int(m.group(1)) - m = re.search(r"#define\WDB_VERSION_MINOR\W(\d+)", f) + m = re.search(br"#define\WDB_VERSION_MINOR\W(\d+)", f) 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) + m = re.search(br"#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, |