Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c3ffef6

Browse files
committed
- Build dbm module using libdb1 if it's available. This fixes SF bug "[
#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.
1 parent dac5849 commit c3ffef6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ def detect_modules(self):
362362
if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
363363
exts.append( Extension('dbm', ['dbmmodule.c'],
364364
libraries = ['ndbm'] ) )
365+
elif self.compiler.find_library_file(lib_dirs, 'db1'):
366+
exts.append( Extension('dbm', ['dbmmodule.c'],
367+
libraries = ['db1'] ) )
365368
else:
366369
exts.append( Extension('dbm', ['dbmmodule.c']) )
367370

@@ -384,6 +387,8 @@ def detect_modules(self):
384387
dblib = []
385388
if self.compiler.find_library_file(lib_dirs, 'db-3.1'):
386389
dblib = ['db-3.1']
390+
elif self.compiler.find_library_file(lib_dirs, 'db3'):
391+
dblib = ['db3']
387392
elif self.compiler.find_library_file(lib_dirs, 'db2'):
388393
dblib = ['db2']
389394
elif self.compiler.find_library_file(lib_dirs, 'db1'):

0 commit comments

Comments
 (0)