mirror of
https://github.com/python/cpython.git
synced 2025-09-15 21:26:04 +00:00
use pkg-config to find the libffi headers when --with-system-ffi is used #6943
This commit is contained in:
parent
8cdc9bc901
commit
1c335e63c9
4 changed files with 128 additions and 3 deletions
4
setup.py
4
setup.py
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue