mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
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 ........
This commit is contained in:
parent
b7b0019a2e
commit
d78735d8e3
5 changed files with 138 additions and 6 deletions
12
setup.py
12
setup.py
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue