mirror of
https://github.com/python/cpython.git
synced 2025-10-22 06:32:43 +00:00
- 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.
This commit is contained in:
parent
dac58492aa
commit
c3ffef6666
1 changed files with 5 additions and 0 deletions
5
setup.py
5
setup.py
|
@ -362,6 +362,9 @@ class PyBuildExt(build_ext):
|
||||||
if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
|
if (self.compiler.find_library_file(lib_dirs, 'ndbm')):
|
||||||
exts.append( Extension('dbm', ['dbmmodule.c'],
|
exts.append( Extension('dbm', ['dbmmodule.c'],
|
||||||
libraries = ['ndbm'] ) )
|
libraries = ['ndbm'] ) )
|
||||||
|
elif self.compiler.find_library_file(lib_dirs, 'db1'):
|
||||||
|
exts.append( Extension('dbm', ['dbmmodule.c'],
|
||||||
|
libraries = ['db1'] ) )
|
||||||
else:
|
else:
|
||||||
exts.append( Extension('dbm', ['dbmmodule.c']) )
|
exts.append( Extension('dbm', ['dbmmodule.c']) )
|
||||||
|
|
||||||
|
@ -384,6 +387,8 @@ class PyBuildExt(build_ext):
|
||||||
dblib = []
|
dblib = []
|
||||||
if self.compiler.find_library_file(lib_dirs, 'db-3.1'):
|
if self.compiler.find_library_file(lib_dirs, 'db-3.1'):
|
||||||
dblib = ['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'):
|
elif self.compiler.find_library_file(lib_dirs, 'db2'):
|
||||||
dblib = ['db2']
|
dblib = ['db2']
|
||||||
elif self.compiler.find_library_file(lib_dirs, 'db1'):
|
elif self.compiler.find_library_file(lib_dirs, 'db1'):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue