aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/bsddb-libpath.diff
blob: 2dcb6f0f96d9e71a5044b8a6e625cada4cc1d227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# DP: Don't add the bsddb multilib path, if already in the standard lib path

--- a/setup.py
+++ b/setup.py
@@ -977,7 +977,13 @@
             if db_setup_debug:
                 print "bsddb using BerkeleyDB lib:", db_ver, dblib
                 print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
-            db_incs = [db_incdir]
+            # only add db_incdir/dblib_dir if not in the standard paths
+            if db_incdir in inc_dirs:
+                db_incs = []
+            else:
+                db_incs = [db_incdir]
+            if dblib_dir[0] in lib_dirs:
+                dblib_dir = []
             dblibs = [dblib]
             # We add the runtime_library_dirs argument because the
             # BerkeleyDB lib we're linking against often isn't in the