Author: Armin Rigo <[email protected]>
Branch:
Changeset: r2821:29624c75b419
Date: 2016-11-27 08:38 +0000
http://bitbucket.org/cffi/cffi/changeset/29624c75b419/
Log: Merged in umireon/cffi/build-with-xcode-only (pull request #73)
Able to build on macOS only with Xcode but without CLT
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
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit