diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2016-09-10 00:01:21 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2016-09-10 00:01:21 (GMT) |
commit | 935043d1ac19d07ac48233c6175250e66a7bbebd (patch) | |
tree | b5a4d3b5202fbe75b904e8c35e141891ceb18dd6 /setup.py | |
parent | b7f3c944d1d0865ce797848e3a40c3ad9435b698 (diff) | |
download | cpython-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.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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] == '': |