use pkg-config to find the libffi headers when --with-system-ffi is used #6943

This commit is contained in:
Benjamin Peterson 2010-01-01 15:16:29 +00:00
parent 8cdc9bc901
commit 1c335e63c9
4 changed files with 128 additions and 3 deletions

View file

@ -1790,7 +1790,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)