[Python-checkins] r72111 - in python/trunk: configure.in setup.py

matthias.klose python-checkins at python.org
Wed Apr 29 21:52:50 CEST 2009


Author: matthias.klose
Date: Wed Apr 29 21:52:49 2009
New Revision: 72111

Log:
- Issue #4587: Add configure option --with-dbmliborder=db1:db2:... to specify 
  the order that backends for the dbm extension are checked. 


Modified:
   python/trunk/configure.in
   python/trunk/setup.py

Modified: python/trunk/configure.in
==============================================================================
--- python/trunk/configure.in	(original)
+++ python/trunk/configure.in	Wed Apr 29 21:52:49 2009
@@ -1921,7 +1921,7 @@
 # Check for --with-dbmliborder
 AC_MSG_CHECKING(for --with-dbmliborder)
 AC_ARG_WITH(dbmliborder,
-            AC_HELP_STRING(--with-dbmliborder=db1:db2:..., order to check db backends for dbm),
+            AC_HELP_STRING([--with-dbmliborder=db1:db2:...], [order to check db backends for dbm. Valid value is a colon separated string with the backend names `ndbm', `gdbm' and `bdb'.]),
 [
 if test x$with_dbmliborder = xyes
 then

Modified: python/trunk/setup.py
==============================================================================
--- python/trunk/setup.py	(original)
+++ python/trunk/setup.py	Wed Apr 29 21:52:49 2009
@@ -1000,13 +1000,14 @@
 
         # 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":


More information about the Python-checkins mailing list