[Python-checkins] r77217 - in python/branches/release31-maint: Misc/NEWS setup.py

benjamin.peterson python-checkins at python.org
Fri Jan 1 17:29:51 CET 2010


Author: benjamin.peterson
Date: Fri Jan  1 17:29:51 2010
New Revision: 77217

Log:
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
  ........
................


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Misc/NEWS
   python/branches/release31-maint/setup.py

Modified: python/branches/release31-maint/Misc/NEWS
==============================================================================
--- python/branches/release31-maint/Misc/NEWS	(original)
+++ python/branches/release31-maint/Misc/NEWS	Fri Jan  1 17:29:51 2010
@@ -406,6 +406,8 @@
 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.
 

Modified: python/branches/release31-maint/setup.py
==============================================================================
--- python/branches/release31-maint/setup.py	(original)
+++ python/branches/release31-maint/setup.py	Fri Jan  1 17:29:51 2010
@@ -893,14 +893,15 @@
         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 @@
                 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:


More information about the Python-checkins mailing list