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

  1. diff --git a/setup.py b/setup.py
  2. index 7868b7b..10ec68f 100644
  3. --- a/setup.py
  4. +++ b/setup.py
  5. @@ -1067,6 +1067,7 @@ class PyBuildExt(build_ext):
  6. if db_setup_debug: print "db lib: ", dblib, "not found"
  7. except db_found:
  8. + rt_dblib_dir = None if cross_compiling else dblib_dir
  9. if db_setup_debug:
  10. print "bsddb using BerkeleyDB lib:", db_ver, dblib
  11. print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
  12. @@ -1081,7 +1082,7 @@ class PyBuildExt(build_ext):
  13. exts.append(Extension('_bsddb', ['_bsddb.c'],
  14. depends = ['bsddb.h'],
  15. library_dirs=dblib_dir,
  16. - runtime_library_dirs=dblib_dir,
  17. + runtime_library_dirs=rt_dblib_dir,
  18. include_dirs=db_incs,
  19. libraries=dblibs))
  20. else:
  21. @@ -1292,10 +1293,11 @@ class PyBuildExt(build_ext):
  22. break
  23. elif cand == "bdb":
  24. if db_incs is not None:
  25. + rt_dblib_dir = None if cross_compiling else dblib_dir
  26. print "building dbm using bdb"
  27. dbmext = Extension('dbm', ['dbmmodule.c'],
  28. library_dirs=dblib_dir,
  29. - runtime_library_dirs=dblib_dir,
  30. + runtime_library_dirs=rt_dblib_dir,
  31. include_dirs=db_incs,
  32. define_macros=[
  33. ('HAVE_BERKDB_H', None),