summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2010-01-01 15:16:29 (GMT)
committerBenjamin Peterson <benjamin@python.org>2010-01-01 15:16:29 (GMT)
commit1c335e63c9e7ca8d6d5ea72fe5ce44cbb0fb5c51 (patch)
tree80d1f7b420e308c9cc968cd969c20592bb817884 /setup.py
parent8cdc9bc9018af92faef452c4364421a1c77a029d (diff)
downloadcpython-1c335e63c9e7ca8d6d5ea72fe5ce44cbb0fb5c51.zip
cpython-1c335e63c9e7ca8d6d5ea72fe5ce44cbb0fb5c51.tar.gz
cpython-1c335e63c9e7ca8d6d5ea72fe5ce44cbb0fb5c51.tar.bz2
use pkg-config to find the libffi headers when --with-system-ffi is used #6943
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 2876372..3749054 100644
--- a/setup.py
+++ b/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)