Lines 1-6
Link Here
|
1 |
--- setup3.py.orig 2016-02-08 21:18:47 UTC |
1 |
--- setup3.py.orig 2020-11-26 15:38:58 UTC |
2 |
+++ setup3.py |
2 |
+++ setup3.py |
3 |
@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.ve |
3 |
@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.version_info >= |
4 |
category=DeprecationWarning) |
4 |
category=DeprecationWarning) |
5 |
|
5 |
|
6 |
|
6 |
|
Lines 13-19
Link Here
|
13 |
from distutils.dep_util import newer |
13 |
from distutils.dep_util import newer |
14 |
import distutils.ccompiler |
14 |
import distutils.ccompiler |
15 |
|
15 |
|
16 |
@@ -288,8 +284,8 @@ if os.name == 'posix': |
16 |
@@ -152,7 +148,8 @@ if os.name == 'posix': |
|
|
17 |
lflags_arg = LFLAGS + LIBS |
18 |
|
19 |
# Supported Berkeley DB versions, in order of preference. |
20 |
- db_ver_list = ((6, 2), (6, 1), |
21 |
+ db_ver_list = ((18, 1), (18, 0), |
22 |
+ (6, 2), (6, 1), |
23 |
(5, 3), (5, 1), |
24 |
(4, 8), (4, 7)) |
25 |
db_ver = None |
26 |
@@ -298,8 +295,8 @@ if os.name == 'posix': |
17 |
incdir = os.path.join(BERKELEYDB_DIR, 'include') |
27 |
incdir = os.path.join(BERKELEYDB_DIR, 'include') |
18 |
if not libdir: |
28 |
if not libdir: |
19 |
libdir = os.path.join(BERKELEYDB_DIR, 'lib') |
29 |
libdir = os.path.join(BERKELEYDB_DIR, 'lib') |
Lines 24-30
Link Here
|
24 |
else: |
34 |
else: |
25 |
if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'") |
35 |
if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'") |
26 |
libname = [] |
36 |
libname = [] |
27 |
@@ -328,7 +324,7 @@ if os.name == 'posix': |
37 |
@@ -338,7 +335,7 @@ if os.name == 'posix': |
28 |
|
38 |
|
29 |
# read db.h to figure out what version of Berkeley DB this is |
39 |
# read db.h to figure out what version of Berkeley DB this is |
30 |
ver = None |
40 |
ver = None |
Lines 33-35
Link Here
|
33 |
db_h_lines = f.readlines() |
43 |
db_h_lines = f.readlines() |
34 |
db_ver_re = re.compile( |
44 |
db_ver_re = re.compile( |
35 |
r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*') |
45 |
r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*') |
|
|
46 |
@@ -350,8 +347,8 @@ if os.name == 'posix': |
47 |
if not match: |
48 |
continue |
49 |
fullverstr = match.group(1) |
50 |
- ver = fullverstr[0] + fullverstr[2] # 31 == 3.1, 32 == 3.2, etc. |
51 |
- db_ver = (int(fullverstr[0]), int(fullverstr[2])) |
52 |
+ ver = fullverstr.split('.') |
53 |
+ db_ver = (int(ver[0]), int(ver[1])) |
54 |
if (db_ver2 is not None) and (db_ver != db_ver2) : |
55 |
raise AssertionError("Detected Berkeley DB version is inconsistent") |
56 |
if db_ver not in db_ver_list: |