diff options
author | Matthias Klose <doko@ubuntu.com> | 2009-04-29 19:52:49 (GMT) |
---|---|---|
committer | Matthias Klose <doko@ubuntu.com> | 2009-04-29 19:52:49 (GMT) |
commit | 51c614e3bf7623959ef029a434ee7aa7d77c219d (patch) | |
tree | 3369315a4d63350ff1e4f41f094b84bdd255fd63 /setup.py | |
parent | 10cbe4886e796ccb8e38bb4d93265ff50c8a761f (diff) | |
download | cpython-51c614e3bf7623959ef029a434ee7aa7d77c219d.zip cpython-51c614e3bf7623959ef029a434ee7aa7d77c219d.tar.gz cpython-51c614e3bf7623959ef029a434ee7aa7d77c219d.tar.bz2 |
- Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify
the order that backends for the dbm extension are checked.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1000,13 +1000,14 @@ class PyBuildExt(build_ext): # The standard Unix dbm module: if platform not in ['cygwin']: - config_args = sysconfig.get_config_var("CONFIG_ARGS") - dbm_args = [arg.split('=')[-1] for arg in args.split() + config_args = [arg.strip("'") + for arg in sysconfig.get_config_var("CONFIG_ARGS").split()] + dbm_args = [arg.split('=')[-1] for arg in config_args if arg.startswith('--with-dbmliborder=')] if dbm_args: - dbm_order = "ndbm:gdbm:bdb".split(":") + dbm_order = dbm_args[-1].split(":") else: - dbm_order = dbm_args.split(":") + dbm_order = "ndbm:gdbm:bdb".split(":") dbmext = None for cand in dbm_order: if cand == "ndbm": |