You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.7 KiB

diff --git a/setup.py b/setup.py
index 7868b7b..10ec68f 100644
--- a/setup.py
+++ b/setup.py
@@ -1067,6 +1067,7 @@ class PyBuildExt(build_ext):
if db_setup_debug: print "db lib: ", dblib, "not found"
except db_found:
+ rt_dblib_dir = None if cross_compiling else dblib_dir
if db_setup_debug:
print "bsddb using BerkeleyDB lib:", db_ver, dblib
print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
@@ -1081,7 +1082,7 @@ class PyBuildExt(build_ext):
exts.append(Extension('_bsddb', ['_bsddb.c'],
depends = ['bsddb.h'],
library_dirs=dblib_dir,
- runtime_library_dirs=dblib_dir,
+ runtime_library_dirs=rt_dblib_dir,
include_dirs=db_incs,
libraries=dblibs))
else:
@@ -1292,10 +1293,11 @@ class PyBuildExt(build_ext):
break
elif cand == "bdb":
if db_incs is not None:
+ rt_dblib_dir = None if cross_compiling else dblib_dir
print "building dbm using bdb"
dbmext = Extension('dbm', ['dbmmodule.c'],
library_dirs=dblib_dir,
- runtime_library_dirs=dblib_dir,
+ runtime_library_dirs=rt_dblib_dir,
include_dirs=db_incs,
define_macros=[
('HAVE_BERKDB_H', None),