mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
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.
This commit is contained in:
parent
83118c6cb3
commit
6fe3d7009e
1 changed files with 10 additions and 0 deletions
10
setup.py
10
setup.py
|
@ -507,15 +507,25 @@ class PyBuildExt(build_ext):
|
||||||
dblibs = [dblib]
|
dblibs = [dblib]
|
||||||
raise found
|
raise found
|
||||||
except 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':
|
if dbinc == 'db_185.h':
|
||||||
exts.append(Extension('bsddb', ['bsddbmodule.c'],
|
exts.append(Extension('bsddb', ['bsddbmodule.c'],
|
||||||
library_dirs=[dblib_dir],
|
library_dirs=[dblib_dir],
|
||||||
|
runtime_library_dirs=[dblib_dir],
|
||||||
include_dirs=db_incs,
|
include_dirs=db_incs,
|
||||||
define_macros=[('HAVE_DB_185_H',1)],
|
define_macros=[('HAVE_DB_185_H',1)],
|
||||||
libraries=[dblib]))
|
libraries=[dblib]))
|
||||||
else:
|
else:
|
||||||
exts.append(Extension('bsddb', ['bsddbmodule.c'],
|
exts.append(Extension('bsddb', ['bsddbmodule.c'],
|
||||||
library_dirs=[dblib_dir],
|
library_dirs=[dblib_dir],
|
||||||
|
runtime_library_dirs=[dblib_dir],
|
||||||
include_dirs=db_incs,
|
include_dirs=db_incs,
|
||||||
libraries=[dblib]))
|
libraries=[dblib]))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue