blob: dacb552ec791639da8057f37f4407a2785de4102 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001python should search for db.h in inc_dirs and not in a hardcoded path.
2If db.h is found but HASHVERSION is not 2 we avoid a warning by not
3adding this module to missing variable.
4
5Upstream-Status: Inappropriate [distribution]
6
7Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
8
9
10diff --git a/setup.py b/setup.py
11index b887808..ae51607 100644
12--- a/setup.py
13+++ b/setup.py
14@@ -1237,6 +1237,8 @@ class PyBuildExt(build_ext):
15 # the more recent berkeleydb's db.h file first in the include path
16 # when attempting to compile and it will fail.
17 f = "/usr/include/db.h"
18+ if len(inc_dirs) != 0:
19+ f = os.path.join(inc_dirs[0], "db.h")
20
21 if host_platform == 'darwin':
22 if is_macosx_sdk_path(f):
23@@ -1257,8 +1259,10 @@ class PyBuildExt(build_ext):
24 libraries=libraries))
25 else:
26 exts.append(Extension('bsddb185', ['bsddbmodule.c']))
27- else:
28- missing.append('bsddb185')
29+ # If a newer version is detected don't report an useless
30+ # warning
31+ #else:
32+ # missing.append('bsddb185')
33 else:
34 missing.append('bsddb185')
35