summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-01 16:29:51 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-01 16:29:51 (GMT)
commita09e87097f995f03c8c01a46b522e015c07ebca0 (patch)
tree613a6f2f1d3df782ecb0da9c8f519dfcb87a49d9 /setup.py
parent370fe530c89f39008ca4deadc8c5f96adf0551f4 (diff)
downloadcpython-a09e87097f995f03c8c01a46b522e015c07ebca0.zip
cpython-a09e87097f995f03c8c01a46b522e015c07ebca0.tar.gz
cpython-a09e87097f995f03c8c01a46b522e015c07ebca0.tar.bz2
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 ........ ................
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index b8bad14..ef70df9 100644
--- a/setup.py
+++ b/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: