Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r2823:9deaf0080a20
Date: 2016-11-28 10:11 +0100
http://bitbucket.org/cffi/cffi/changeset/9deaf0080a20/

Log:    merge heads

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -122,6 +122,20 @@
 if 'freebsd' in sys.platform:
     include_dirs.append('/usr/local/include')
 
+if 'darwin' in sys.platform:
+    try:
+        p = subprocess.Popen(['xcrun', '--show-sdk-path'],
+                             stdout=subprocess.PIPE)
+    except OSError as e:
+        if e.errno not in [errno.ENOENT, errno.EACCES]:
+            raise
+    else:
+        t = p.stdout.read().decode().strip()
+        p.stdout.close()
+        if p.wait() == 0:
+            include_dirs.append(t + '/usr/include/ffi')
+
+
 
 if __name__ == '__main__':
     from setuptools import setup, Distribution, Extension
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to