1 |
davidlt |
1.1 |
diff --git a/setup.py b/setup.py
|
2 |
|
|
index 6b47451..cb79bdf 100644
|
3 |
|
|
--- a/setup.py
|
4 |
|
|
+++ b/setup.py
|
5 |
|
|
@@ -801,7 +801,7 @@ class PyBuildExt(build_ext):
|
6 |
|
|
|
7 |
|
|
max_db_ver = (4, 8)
|
8 |
|
|
min_db_ver = (4, 1)
|
9 |
|
|
- db_setup_debug = False # verbose debug prints from this script?
|
10 |
|
|
+ db_setup_debug = True # verbose debug prints from this script?
|
11 |
|
|
|
12 |
|
|
def allow_db_ver(db_ver):
|
13 |
|
|
"""Returns a boolean if the given BerkeleyDB version is acceptable.
|
14 |
|
|
@@ -832,55 +832,6 @@ class PyBuildExt(build_ext):
|
15 |
|
|
else:
|
16 |
|
|
raise ValueError("unknown major BerkeleyDB version", major)
|
17 |
|
|
|
18 |
|
|
- # construct a list of paths to look for the header file in on
|
19 |
|
|
- # top of the normal inc_dirs.
|
20 |
|
|
- db_inc_paths = [
|
21 |
|
|
- '/usr/include/db4',
|
22 |
|
|
- '/usr/local/include/db4',
|
23 |
|
|
- '/opt/sfw/include/db4',
|
24 |
|
|
- '/usr/include/db3',
|
25 |
|
|
- '/usr/local/include/db3',
|
26 |
|
|
- '/opt/sfw/include/db3',
|
27 |
|
|
- # Fink defaults (http://fink.sourceforge.net/)
|
28 |
|
|
- '/sw/include/db4',
|
29 |
|
|
- '/sw/include/db3',
|
30 |
|
|
- ]
|
31 |
|
|
- # 4.x minor number specific paths
|
32 |
|
|
- for x in gen_db_minor_ver_nums(4):
|
33 |
|
|
- db_inc_paths.append('/usr/include/db4%d' % x)
|
34 |
|
|
- db_inc_paths.append('/usr/include/db4.%d' % x)
|
35 |
|
|
- db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
|
36 |
|
|
- db_inc_paths.append('/usr/local/include/db4%d' % x)
|
37 |
|
|
- db_inc_paths.append('/pkg/db-4.%d/include' % x)
|
38 |
|
|
- db_inc_paths.append('/opt/db-4.%d/include' % x)
|
39 |
|
|
- # MacPorts default (http://www.macports.org/)
|
40 |
|
|
- db_inc_paths.append('/opt/local/include/db4%d' % x)
|
41 |
|
|
- # 3.x minor number specific paths
|
42 |
|
|
- for x in gen_db_minor_ver_nums(3):
|
43 |
|
|
- db_inc_paths.append('/usr/include/db3%d' % x)
|
44 |
|
|
- db_inc_paths.append('/usr/local/BerkeleyDB.3.%d/include' % x)
|
45 |
|
|
- db_inc_paths.append('/usr/local/include/db3%d' % x)
|
46 |
|
|
- db_inc_paths.append('/pkg/db-3.%d/include' % x)
|
47 |
|
|
- db_inc_paths.append('/opt/db-3.%d/include' % x)
|
48 |
|
|
-
|
49 |
|
|
- # Add some common subdirectories for Sleepycat DB to the list,
|
50 |
|
|
- # based on the standard include directories. This way DB3/4 gets
|
51 |
|
|
- # picked up when it is installed in a non-standard prefix and
|
52 |
|
|
- # the user has added that prefix into inc_dirs.
|
53 |
|
|
- std_variants = []
|
54 |
|
|
- for dn in inc_dirs:
|
55 |
|
|
- std_variants.append(os.path.join(dn, 'db3'))
|
56 |
|
|
- std_variants.append(os.path.join(dn, 'db4'))
|
57 |
|
|
- for x in gen_db_minor_ver_nums(4):
|
58 |
|
|
- std_variants.append(os.path.join(dn, "db4%d"%x))
|
59 |
|
|
- std_variants.append(os.path.join(dn, "db4.%d"%x))
|
60 |
|
|
- for x in gen_db_minor_ver_nums(3):
|
61 |
|
|
- std_variants.append(os.path.join(dn, "db3%d"%x))
|
62 |
|
|
- std_variants.append(os.path.join(dn, "db3.%d"%x))
|
63 |
|
|
-
|
64 |
|
|
- db_inc_paths = std_variants + db_inc_paths
|
65 |
|
|
- db_inc_paths = [p for p in db_inc_paths if os.path.exists(p)]
|
66 |
|
|
-
|
67 |
|
|
db_ver_inc_map = {}
|
68 |
|
|
|
69 |
|
|
if sys.platform == 'darwin':
|
70 |
|
|
@@ -890,7 +841,7 @@ class PyBuildExt(build_ext):
|
71 |
|
|
try:
|
72 |
|
|
# See whether there is a Sleepycat header in the standard
|
73 |
|
|
# search path.
|
74 |
|
|
- for d in inc_dirs + db_inc_paths:
|
75 |
|
|
+ for d in [os.environ["DB4_ROOT"]]:
|
76 |
|
|
f = os.path.join(d, "db.h")
|
77 |
|
|
|
78 |
|
|
if sys.platform == 'darwin' and is_macosx_sdk_path(d):
|
79 |
|
|
@@ -999,7 +950,7 @@ class PyBuildExt(build_ext):
|
80 |
|
|
missing.append('_bsddb')
|
81 |
|
|
|
82 |
|
|
# The sqlite interface
|
83 |
|
|
- sqlite_setup_debug = False # verbose debug prints from this script?
|
84 |
|
|
+ sqlite_setup_debug = True # verbose debug prints from this script?
|
85 |
|
|
|
86 |
|
|
# We hunt for #define SQLITE_VERSION "n.n.n"
|
87 |
|
|
# We need to find >= sqlite version 3.0.8
|