]> granicus.if.org Git - python/commitdiff
- Build dbm module using libdb1 if it's available. This fixes SF bug "[
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 21 Oct 2001 22:14:44 +0000 (22:14 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 21 Oct 2001 22:14:44 +0000 (22:14 +0000)
  #230075 ] dbmmodule build fails on Debian GNU/Linux unstable (Sid)".

- Build bsddb module with libdb3 if it's available.  It also fixes a bug that
  causes the build of bsddb to fail on Debian if bsddb3-dev is installed.

setup.py

index b3b52f5e5c2913a93e67654ba0556c2f7fec7280..c525e03dd2a7736662438e1c6d6b83189be0950b 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -362,6 +362,9 @@ class PyBuildExt(build_ext):
             if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
                 exts.append( Extension('dbm', ['dbmmodule.c'],
                                        libraries = ['ndbm'] ) )
+            elif self.compiler.find_library_file(lib_dirs, 'db1'):
+                exts.append( Extension('dbm', ['dbmmodule.c'],
+                                       libraries = ['db1'] ) )
             else:
                 exts.append( Extension('dbm', ['dbmmodule.c']) )
 
@@ -384,6 +387,8 @@ class PyBuildExt(build_ext):
         dblib = []
         if self.compiler.find_library_file(lib_dirs, 'db-3.1'):
             dblib = ['db-3.1']
+        elif self.compiler.find_library_file(lib_dirs, 'db3'):
+            dblib = ['db3']
         elif self.compiler.find_library_file(lib_dirs, 'db2'):
             dblib = ['db2']
         elif self.compiler.find_library_file(lib_dirs, 'db1'):