summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2016-09-10 00:01:21 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2016-09-10 00:01:21 (GMT)
commit935043d1ac19d07ac48233c6175250e66a7bbebd (patch)
treeb5a4d3b5202fbe75b904e8c35e141891ceb18dd6 /setup.py
parentb7f3c944d1d0865ce797848e3a40c3ad9435b698 (diff)
downloadcpython-935043d1ac19d07ac48233c6175250e66a7bbebd.zip
cpython-935043d1ac19d07ac48233c6175250e66a7bbebd.tar.gz
cpython-935043d1ac19d07ac48233c6175250e66a7bbebd.tar.bz2
Closes #27976: Deprecate bundled full copy of libffi
Builds on non-OSX UNIX now default to using the system libffi, and warn if the bundled copy is used.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 5811576..d9acd97 100644
--- a/setup.py
+++ b/setup.py
@@ -1911,6 +1911,9 @@ class PyBuildExt(build_ext):
if host_platform == 'darwin':
return self.configure_ctypes_darwin(ext)
+ print('warning: building with the bundled copy of libffi is'
+ ' deprecated on this platform. It will not be'
+ ' distributed with Python 3.7')
srcdir = sysconfig.get_config_var('srcdir')
ffi_builddir = os.path.join(self.build_temp, 'libffi')
ffi_srcdir = os.path.abspath(os.path.join(srcdir, 'Modules',
@@ -2007,13 +2010,14 @@ class PyBuildExt(build_ext):
libraries=math_libs)
self.extensions.extend([ext, ext_test])
- if not '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
- return
-
if host_platform == 'darwin':
+ if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"):
+ return
# OS X 10.5 comes with libffi.dylib; the include files are
# in /usr/include/ffi
inc_dirs.append('/usr/include/ffi')
+ elif '--without-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS"):
+ return
ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
if not ffi_inc or ffi_inc[0] == '':