mirror of
https://github.com/python/cpython.git
synced 2025-01-26 19:13:43 +08:00
Merged revisions 77216 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r77216 | benjamin.peterson | 2010-01-01 10:04:23 -0600 (Fri, 01 Jan 2010) | 21 lines Merged revisions 77212-77215 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk r77215 | benjamin.peterson | 2010-01-01 09:21:13 -0600 (Fri, 01 Jan 2010) | 1 line allow --with-dbmliborder to specify that no dbm modules will be built #6491 ........ ................
This commit is contained in:
parent
370fe530c8
commit
a09e87097f
@ -406,6 +406,8 @@ Extension Modules
|
||||
Build
|
||||
-----
|
||||
|
||||
- Issue #6491: Allow --with-dbmliborder to specify that no dbms will be built.
|
||||
|
||||
- Issue #7589: Only build the nis module when the correct header files are
|
||||
found.
|
||||
|
||||
|
8
setup.py
8
setup.py
@ -893,14 +893,15 @@ class PyBuildExt(build_ext):
|
||||
else:
|
||||
missing.append('_sqlite3')
|
||||
|
||||
dbm_order = ['gdbm']
|
||||
# The standard Unix dbm module:
|
||||
if platform not in ['cygwin']:
|
||||
config_args = [arg.strip("'")
|
||||
for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
|
||||
dbm_args = [arg.split('=')[-1] for arg in config_args
|
||||
dbm_args = [arg for arg in config_args
|
||||
if arg.startswith('--with-dbmliborder=')]
|
||||
if dbm_args:
|
||||
dbm_order = dbm_args[-1].split(":")
|
||||
dbm_order = [arg.split('=')[-1] for arg in dbm_args][-1].split(":")
|
||||
else:
|
||||
dbm_order = "ndbm:gdbm:bdb".split(":")
|
||||
dbmext = None
|
||||
@ -962,7 +963,8 @@ class PyBuildExt(build_ext):
|
||||
missing.append('_dbm')
|
||||
|
||||
# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
|
||||
if (self.compiler.find_library_file(lib_dirs, 'gdbm')):
|
||||
if ('gdbm' in dbm_order and
|
||||
self.compiler.find_library_file(lib_dirs, 'gdbm')):
|
||||
exts.append( Extension('_gdbm', ['_gdbmmodule.c'],
|
||||
libraries = ['gdbm'] ) )
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user