diff --git a/plugins/python-build/share/python-build/patches/3.6.15/Python-3.6.15/0004-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch b/plugins/python-build/share/python-build/patches/3.6.15/Python-3.6.15/0004-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch index ae8a90cb..c69db8b8 100644 --- a/plugins/python-build/share/python-build/patches/3.6.15/Python-3.6.15/0004-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch +++ b/plugins/python-build/share/python-build/patches/3.6.15/Python-3.6.15/0004-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch @@ -243,13 +243,12 @@ index 8e03c77997..3b124c4b7b 100644 include_dirs = [] extra_compile_args = [] extra_link_args = [] -@@ -2162,20 +2180,30 @@ class PyBuildExt(build_ext): +@@ -2162,20 +2180,29 @@ class PyBuildExt(build_ext): libraries=math_libs) self.extensions.extend([ext, ext_test]) + ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR") + ffi_lib = None -+ inc_dirs = self.compiler.include_dirs[:] + if host_platform == 'darwin': - if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"): @@ -284,7 +283,7 @@ index 8e03c77997..3b124c4b7b 100644 with open(ffi_h) as f: for line in f: line = line.strip() -@@ -2186,15 +2214,22 @@ class PyBuildExt(build_ext): +@@ -2186,15 +2213,22 @@ class PyBuildExt(build_ext): ffi_inc = None print('Header file {} does not define LIBFFI_H or ' 'ffi_wrapper_h'.format(ffi_h)) diff --git a/plugins/python-build/share/python-build/patches/3.7.12/Python-3.7.12/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch b/plugins/python-build/share/python-build/patches/3.7.12/Python-3.7.12/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch index 983a8d15..f23946d0 100644 --- a/plugins/python-build/share/python-build/patches/3.7.12/Python-3.7.12/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch +++ b/plugins/python-build/share/python-build/patches/3.7.12/Python-3.7.12/0001-Port-ctypes-and-system-libffi-patches-for-arm64-macO.patch @@ -243,15 +243,13 @@ index bf90600eaa..48ff120e9a 100644 include_dirs = [] extra_compile_args = [] extra_link_args = [] -@@ -2018,30 +2036,49 @@ class PyBuildExt(build_ext): +@@ -2018,30 +2036,47 @@ class PyBuildExt(build_ext): libraries=['m']) self.extensions.extend([ext, ext_test]) + ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR") + ffi_lib = None + -+ #inc_dirs = self.inc_dirs.copy() -+ inc_dirs = self.compiler.include_dirs[:] if host_platform == 'darwin': - if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"): + if not self.use_system_libffi: