diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-01-01 16:04:23 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-01-01 16:04:23 (GMT) |
commit | d78735d8e32411a20fc31a78e705f4c067b4344f (patch) | |
tree | 89ee63b6c0a7cc94af1ea058121b668c6d60de4b /setup.py | |
parent | b7b0019a2e8cab7c26cb0a5121496c7c6c5ea8de (diff) | |
download | cpython-d78735d8e32411a20fc31a78e705f4c067b4344f.zip cpython-d78735d8e32411a20fc31a78e705f4c067b4344f.tar.gz cpython-d78735d8e32411a20fc31a78e705f4c067b4344f.tar.bz2 |
Merged revisions 77212-77215 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77212 | benjamin.peterson | 2010-01-01 09:16:29 -0600 (Fri, 01 Jan 2010) | 1 line
use pkg-config to find the libffi headers when --with-system-ffi is used #6943
........
r77213 | benjamin.peterson | 2010-01-01 09:18:38 -0600 (Fri, 01 Jan 2010) | 1 line
add note
........
r77214 | benjamin.peterson | 2010-01-01 09:20:06 -0600 (Fri, 01 Jan 2010) | 1 line
fix indentation
........
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.py | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -887,14 +887,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 @@ -958,7 +959,8 @@ class PyBuildExt(build_ext): missing.append('_dbm') # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: - if (self.compiler_obj.find_library_file(lib_dirs, 'gdbm')): + if ('gdbm' in dbm_order and + self.compiler_obj.find_library_file(lib_dirs, 'gdbm')): exts.append( Extension('_gdbm', ['_gdbmmodule.c'], libraries = ['gdbm'] ) ) else: @@ -1558,7 +1560,9 @@ class PyBuildExt(build_ext): # in /usr/include/ffi inc_dirs.append('/usr/include/ffi') - ffi_inc = find_file('ffi.h', [], inc_dirs) + ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")] + if not ffi_inc: + ffi_inc = find_file('ffi.h', [], inc_dirs) if ffi_inc is not None: ffi_h = ffi_inc[0] + '/ffi.h' fp = open(ffi_h) |