[Python-checkins] python/dist/src setup.py,1.95,1.96

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
Mon, 24 Jun 2002 13:27:35 -0700


Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv2107

Modified Files:
	setup.py 
Log Message:
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.


Index: setup.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/setup.py,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** setup.py	21 Jun 2002 14:48:38 -0000	1.95
--- setup.py	24 Jun 2002 20:27:33 -0000	1.96
***************
*** 508,514 ****
--- 508,523 ----
                              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)],
***************
*** 517,520 ****
--- 526,530 ----
                  exts.append(Extension('bsddb', ['bsddbmodule.c'],
                                        library_dirs=[dblib_dir],
+                                       runtime_library_dirs=[dblib_dir],
                                        include_dirs=db_incs,
                                        libraries=[dblib]))