summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-06-24 20:27:33 (GMT)
committerBarry Warsaw <barry@python.org>2002-06-24 20:27:33 (GMT)
commit6fe3d7009e0214cc994889a830299be6df7acb92 (patch)
tree0d6b3ce0f68378f9f7e5f99806a3e3699ed97f22 /setup.py
parent83118c6cb36cf9a424bec1b9a2ef8c8760bae8f5 (diff)
downloadcpython-6fe3d7009e0214cc994889a830299be6df7acb92.zip
cpython-6fe3d7009e0214cc994889a830299be6df7acb92.tar.gz
cpython-6fe3d7009e0214cc994889a830299be6df7acb92.tar.bz2
In the Extension() call, add runtime_library_dirs so that a useful
-R/--rpath flag gets passed to the linker. Source builds of BerkeleyDB do their default installs in locations not normally on ld.so's search path.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 1012645..d09602e 100644
--- a/setup.py
+++ b/setup.py
@@ -507,15 +507,25 @@ class PyBuildExt(build_ext):
dblibs = [dblib]
raise found
except found:
+ # A default source build puts Berkeley DB in something like
+ # /usr/local/Berkeley.3.3 and the lib dir under that isn't
+ # normally on ld.so's search path, unless the sysadmin has hacked
+ # /etc/ld.so.conf. We add the directory to runtime_library_dirs
+ # so the proper -R/--rpath flags get passed to the linker. This
+ # is usually correct and most trouble free, but may cause problems
+ # in some unusual system configurations (e.g. the directory is on
+ # an NFS server that goes away).
if dbinc == 'db_185.h':
exts.append(Extension('bsddb', ['bsddbmodule.c'],
library_dirs=[dblib_dir],
+ runtime_library_dirs=[dblib_dir],
include_dirs=db_incs,
define_macros=[('HAVE_DB_185_H',1)],
libraries=[dblib]))
else:
exts.append(Extension('bsddb', ['bsddbmodule.c'],
library_dirs=[dblib_dir],
+ runtime_library_dirs=[dblib_dir],
include_dirs=db_incs,
libraries=[dblib]))
else: