<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ef99b6ee12a0f9a97bc7d667edcb522842a0e160">https://github.com/macports/macports-ports/commit/ef99b6ee12a0f9a97bc7d667edcb522842a0e160</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ef99b6ee12a python37: backport macOS 11 and arm64 fixes
</span>ef99b6ee12a is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ef99b6ee12a0f9a97bc7d667edcb522842a0e160
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Jun 2 07:31:02 2021 +1000
<span style='display:block; white-space:pre;color:#404040;'> python37: backport macOS 11 and arm64 fixes
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/61920
</span>---
lang/python37/Portfile | 20 +-
lang/python37/files/distutils_spawn.py.patch | 25 +
lang/python37/files/macos11.patch | 999 +++++++++++++++++++++++++++
lang/python37/files/patch-setup.py.diff | 8 -
4 files changed, 1030 insertions(+), 22 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/python37/Portfile b/lang/python37/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 23aa74a5ce1..d951fe6ce8c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/python37/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/python37/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -7,7 +7,7 @@ name python37
</span>
# Remember to keep py37-tkinter and py37-gdbm's versions sync'd with this
version 3.7.10
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span>
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -36,7 +36,9 @@ patchfiles patch-setup.py.diff \
</span> patch-libedit.diff \
patch-configure-xcode4bug.diff \
implicit.patch \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- sysconfig.py.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sysconfig.py.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ distutils_spawn.py.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ macos11.patch
</span>
depends_build port:pkgconfig
depends_lib port:bzip2 \
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,18 +54,6 @@ depends_lib port:bzip2 \
</span> depends_run port:python_select \
port:python3_select
<span style='display:block; white-space:pre;background:#ffe0e0;'>-platform darwin arm {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- known_fail yes
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$build_arch ne "x86_64"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- pre-fetch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- error "${name} cannot yet be built for Apple Silicon"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_lib
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # blacklist llvm-gcc-4.2 compiler known to produce bad code
compiler.blacklist-append *llvm-gcc-4.2
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -78,6 +68,8 @@ configure.args --enable-framework=${frameworks_dir} \
</span> --with-system-ffi
configure.ccache no
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# pkg-config removes -I flags for paths in CPATH, which confuses python.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.env PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
</span>
post-patch {
reinplace "s|@@PREFIX@@|${prefix}|g" \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/python37/files/distutils_spawn.py.patch b/lang/python37/files/distutils_spawn.py.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..56d5670be4d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/python37/files/distutils_spawn.py.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,25 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/distutils/spawn.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/distutils/spawn.py 2021-06-02 07:16:55.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -100,13 +100,17 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if _cfg_target:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _cfg_target_split = [int(x) for x in _cfg_target.split('.')]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if _cfg_target:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # ensure that the deployment target of build process is not less
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # than that used when the interpreter was built. This ensures
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # extension modules are built with correct compatibility values
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Ensure that the deployment target of the build process is not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # less than 10.3 if the interpreter was built for 10.3 or later.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # This ensures extension modules are built with correct
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # compatibility values, specifically LDSHARED which can use
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # '-undefined dynamic_lookup' which only works on >= 10.3.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cur_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if _cfg_target_split > [int(x) for x in cur_target.split('.')]:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cur_target_split = [int(x) for x in cur_target.split('.')]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if _cfg_target_split[:2] >= [10, 3] and cur_target_split[:2] < [10, 3]:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: '
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'now "%s" but "%s" during configure'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 'now "%s" but "%s" during configure;'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 'must use 10.3 or later'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ % (cur_target, _cfg_target))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise DistutilsPlatformError(my_msg)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ env = dict(os.environ,
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/python37/files/macos11.patch b/lang/python37/files/macos11.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..8c74c083b6d
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/python37/files/macos11.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,999 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Big Sur and Apple Silicon support, backported from 3.8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+https://github.com/python/cpython/pull/25806
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/_osx_support.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/_osx_support.py 2021-06-02 05:24:23.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -52,7 +52,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return executable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-def _read_output(commandstring):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def _read_output(commandstring, capture_stderr=False):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Output from successful command execution or None"""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Similar to os.popen(commandstring, "r").read(),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # but without actually using os.popen because that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -67,7 +67,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ os.getpid(),), "w+b")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with contextlib.closing(fp) as fp:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cmd = "%s 2>/dev/null >'%s'" % (commandstring, fp.name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if capture_stderr:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cmd = "%s >'%s' 2>&1" % (commandstring, fp.name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cmd = "%s 2>/dev/null >'%s'" % (commandstring, fp.name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return fp.read().decode('utf-8').strip() if not os.system(cmd) else None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -110,6 +113,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return _SYSTEM_VERSION
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_SYSTEM_VERSION_TUPLE = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def _get_system_version_tuple():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Return the macOS system version as a tuple
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ The return value is safe to use to compare
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ two version numbers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ global _SYSTEM_VERSION_TUPLE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if _SYSTEM_VERSION_TUPLE is None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ osx_version = _get_system_version()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if osx_version:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _SYSTEM_VERSION_TUPLE = tuple(int(i) for i in osx_version.split('.'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ except ValueError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _SYSTEM_VERSION_TUPLE = ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return _SYSTEM_VERSION_TUPLE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def _remove_original_values(_config_vars):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Remove original unmodified values for testing"""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This is needed for higher-level cross-platform tests of get_platform.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -125,6 +148,33 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _config_vars[_INITPRE + cv] = oldvalue
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _config_vars[cv] = newvalue
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_cache_default_sysroot = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def _default_sysroot(cc):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ """ Returns the root of the default SDK for this system, or '/' """
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ global _cache_default_sysroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if _cache_default_sysroot is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return _cache_default_sysroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ contents = _read_output('%s -c -E -v - </dev/null' % (cc,), True)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_incdirs = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for line in contents.splitlines():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if line.startswith("#include <...>"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_incdirs = True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif line.startswith("End of search list"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ in_incdirs = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif in_incdirs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ line = line.strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if line == '/usr/include':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _cache_default_sysroot = '/'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif line.endswith(".sdk/usr/include"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _cache_default_sysroot = line[:-12]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if _cache_default_sysroot is None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _cache_default_sysroot = '/'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return _cache_default_sysroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def _supports_universal_builds():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Returns True if universal builds are supported on this system"""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # As an approximation, we assume that if we are running on 10.4 or above,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -132,14 +182,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # builds, in particular -isysroot and -arch arguments to the compiler. This
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # is in support of allowing 10.4 universal builds to run on 10.3.x systems.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- osx_version = _get_system_version()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if osx_version:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- osx_version = tuple(int(i) for i in osx_version.split('.'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- except ValueError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- osx_version = ''
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ osx_version = _get_system_version_tuple()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return bool(osx_version >= (10, 4)) if osx_version else False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def _supports_arm64_builds():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ """Returns True if arm64 builds are supported on this system"""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # There are two sets of systems supporting macOS/arm64 builds:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 1. macOS 11 and later, unconditionally
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 2. macOS 10.15 with Xcode 12.2 or later
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # For now the second category is ignored.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ osx_version = _get_system_version_tuple()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return osx_version >= (11, 0) if osx_version else False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def _find_appropriate_compiler(_config_vars):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Find appropriate C compiler for extension module builds"""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -331,6 +385,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except ValueError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif not _supports_arm64_builds():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # Look for "-arch arm64" and drop that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for idx in reversed(range(len(compiler_so))):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if compiler_so[idx] == '-arch' and compiler_so[idx+1] == "arm64":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ del compiler_so[idx:idx+2]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if 'ARCHFLAGS' in os.environ and not stripArch:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # User specified different -arch flags in the environ,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see also distutils.sysconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -481,6 +541,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if len(archs) == 1:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ machine = archs[0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ elif archs == ('arm64', 'x86_64'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ machine = 'universal2'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif archs == ('i386', 'ppc'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ machine = 'fat'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif archs == ('i386', 'x86_64'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/ctypes/macholib/dyld.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/ctypes/macholib/dyld.py 2021-06-02 05:26:49.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6,6 +6,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from ctypes.macholib.framework import framework_info
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from ctypes.macholib.dylib import dylib_info
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from itertools import *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ from _ctypes import _dyld_shared_cache_contains_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++except ImportError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ def _dyld_shared_cache_contains_path(*args):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ raise NotImplementedError
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ __all__ = [
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'dyld_find', 'framework_find',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -122,8 +127,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dyld_executable_path_search(name, executable_path),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dyld_default_search(name, env),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ), env):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if os.path.isfile(path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if _dyld_shared_cache_contains_path(path):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ except NotImplementedError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ raise ValueError("dylib %s could not be found" % (name,))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def framework_find(fn, executable_path=None, env=None):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/ctypes/test/test_macholib.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/ctypes/test/test_macholib.py 2021-06-02 05:28:07.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -45,19 +45,22 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ class MachOTest(unittest.TestCase):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ @unittest.skipUnless(sys.platform == "darwin", 'OSX-specific test')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def test_find(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self.assertEqual(find_lib('pthread'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- '/usr/lib/libSystem.B.dylib')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # On Mac OS 11, system dylibs are only present in the shared cache,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # so symlinks like libpthread.dylib -> libSystem.B.dylib will not
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # be resolved by dyld_find
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self.assertIn(find_lib('pthread'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ('/usr/lib/libSystem.B.dylib', '/usr/lib/libpthread.dylib'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result = find_lib('z')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Issue #21093: dyld default search path includes $HOME/lib and
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # /usr/local/lib before /usr/lib, which caused test failures if
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # a local copy of libz exists in one of them. Now ignore the head
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # of the path.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self.assertRegex(result, r".*/lib/libz\..*.*\.dylib")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self.assertRegex(result, r".*/lib/libz.*\.dylib")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self.assertEqual(find_lib('IOKit'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- '/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self.assertIn(find_lib('IOKit'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ('/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ '/System/Library/Frameworks/IOKit.framework/IOKit'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if __name__ == "__main__":
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unittest.main()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/distutils/tests/test_build_ext.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/distutils/tests/test_build_ext.py 2021-06-02 05:46:15.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -475,7 +475,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ target = '%02d%01d0' % target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # for 10.10 and beyond -> "10nn00"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- target = '%02d%02d00' % target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if len(target) >= 2:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target = '%02d%02d00' % target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # 11 and later can have no minor version (11 instead of 11.0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ target = '%02d0000' % target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ deptarget_ext = Extension(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'deptarget',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [deptarget_c],
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/distutils/unixccompiler.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/distutils/unixccompiler.py 2021-06-02 05:47:23.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -290,7 +290,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cflags = sysconfig.get_config_var('CFLAGS')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ m = re.search(r'-isysroot\s*(\S+)', cflags)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if m is None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sysroot = '/'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sysroot = _osx_support._default_sysroot(sysconfig.get_config_var('CC'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sysroot = m.group(1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/sysconfig.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/sysconfig.py 2021-06-02 05:49:01.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -18,6 +18,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'parse_config_h',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Keys for get_config_var() that are never converted to Python integers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_ALWAYS_STR = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ 'MACOSX_DEPLOYMENT_TARGET',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _INSTALL_SCHEMES = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'posix_prefix': {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 'stdlib': '{installed_base}/lib/python{py_version_short}',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -242,6 +247,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notdone[n] = v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if n in _ALWAYS_STR:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ raise ValueError
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v = int(v)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except ValueError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # insert literal `$'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -300,6 +308,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ notdone[name] = value
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if name in _ALWAYS_STR:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ raise ValueError
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ value = int(value)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except ValueError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ done[name] = value.strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -460,6 +470,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if m:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ n, v = m.group(1, 2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if n in _ALWAYS_STR:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ raise ValueError
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v = int(v)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ except ValueError:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/test/test_bytes.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/test/test_bytes.py 2021-06-02 05:50:46.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -903,6 +903,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ c_char_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyBytes_FromFormat = pythonapi.PyBytes_FromFormat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyBytes_FromFormat.argtypes = (c_char_p,)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyBytes_FromFormat.restype = py_object
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # basic tests
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/test/test_platform.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/test/test_platform.py 2021-06-02 05:56:02.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -254,7 +254,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self.assertEqual(res[1], ('', '', ''))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if sys.byteorder == 'little':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self.assertIn(res[2], ('i386', 'x86_64'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self.assertIn(res[2], ('i386', 'x86_64', 'arm64'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self.assertEqual(res[2], 'PowerPC')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Lib/test/test_unicode.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Lib/test/test_unicode.py 2021-06-02 05:57:50.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2458,11 +2458,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def test_from_format(self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ support.import_module('ctypes')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from ctypes import (
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ c_char_p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pythonapi, py_object, sizeof,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ c_int, c_long, c_longlong, c_ssize_t,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ c_uint, c_ulong, c_ulonglong, c_size_t, c_void_p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ name = "PyUnicode_FromFormat"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _PyUnicode_FromFormat = getattr(pythonapi, name)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ _PyUnicode_FromFormat.argtypes = (c_char_p,)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _PyUnicode_FromFormat.restype = py_object
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def PyUnicode_FromFormat(format, *args):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Mac/README.rst.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Mac/README.rst 2021-06-02 06:03:31.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -120,6 +120,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ using the configure option ``--with-universal-archs=VALUE``. The following
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ values are available:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * ``universal2``: ``arm64``, ``x86_64``
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ``intel``: ``i386``, ``x86_64``
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ``intel-32``: ``i386``
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -155,6 +157,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * 10.15 and later SDKs support ``intel-64`` only
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * 11.0 and later SDKs support ``universal2``
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ The makefile for a framework build will also install ``python3.x-32``
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ binaries when the universal architecture includes at least one 32-bit
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ architecture (that is, for all flavors but ``64-bit`` and ``intel-64``).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Mac/Tools/pythonw.c.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Mac/Tools/pythonw.c 2021-06-02 06:04:24.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -95,9 +95,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size_t count;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cpu_type_t cpu_types[1];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ short flags = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#ifdef __LP64__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int ch;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((errno = posix_spawnattr_init(spawnattr)) != 0) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ err(2, "posix_spawnattr_int");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -119,10 +116,16 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__ppc__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cpu_types[0] = CPU_TYPE_POWERPC;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__i386__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cpu_types[0] = CPU_TYPE_X86;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__arm64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cpu_types[0] = CPU_TYPE_ARM64;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # error "Unknown CPU"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (posix_spawnattr_setbinpref_np(spawnattr, count,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -220,7 +223,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* We're weak-linking to posix-spawnv to ensure that
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * an executable build on 10.5 can work on 10.4.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (posix_spawn != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (&posix_spawn != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ posix_spawnattr_t spawnattr = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ setup_spawnattr(&spawnattr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Misc/ACKS.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Misc/ACKS 2021-06-02 06:05:21.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -128,6 +128,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Ian Beer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Stefan Behnel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Reimer Behrends
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Maxime Bélanger
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Ben Bell
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Thomas Bellman
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Alexander “Саша” Belopolsky
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -334,6 +335,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ David Costanzo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Scott Cotton
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Greg Couch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++FX Coudert
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ David Cournapeau
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Julien Courteau
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Steve Cousins
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -363,6 +365,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Evan Dandrea
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Eric Daniel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Scott David Daniels
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Lawrence D'Anna
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Ben Darnell
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Kushal Das
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Jonathan Dasteel
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1411,6 +1414,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Rusty Russell
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Nick Russo
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ James Rutherford
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Eli Rykoff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Chris Ryland
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Bernt Røskar Brenna
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Constantina S.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Modules/_ctypes/callbacks.c.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Modules/_ctypes/callbacks.c 2021-06-02 06:07:10.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1,6 +1,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "Python.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "frameobject.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdbool.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <ffi.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef MS_WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <windows.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -18,7 +20,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Py_XDECREF(self->callable);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Py_XDECREF(self->restype);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (self->pcl_write)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ffi_closure_free(self->pcl_write);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_ffi_closure_free(self->pcl_write);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyObject_GC_Del(self);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -341,8 +343,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assert(CThunk_CheckExact((PyObject *)p));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- &p->pcl_exec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->pcl_write = Py_ffi_closure_alloc(sizeof(ffi_closure), &p->pcl_exec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (p->pcl_write == NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyErr_NoMemory();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto error;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -388,13 +389,35 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "ffi_prep_cif failed with %d", result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto error;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(X86_DARWIN) || defined(POWERPC_DARWIN)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if HAVE_FFI_PREP_CLOSURE_LOC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if USING_APPLE_OS_LIBFFI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (HAVE_FFI_PREP_CLOSURE_LOC_RUNTIME) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ p->pcl_exec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if USING_APPLE_OS_LIBFFI && defined(__arm64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyErr_Format(PyExc_NotImplementedError, "ffi_prep_closure_loc() is missing");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ goto error;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- p,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- p->pcl_exec);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef MACOSX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #pragma clang diagnostic push
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ result = ffi_prep_closure(p->pcl_write, &p->cif, closure_fcn, p);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef MACOSX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #pragma clang diagnostic pop
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (result != FFI_OK) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyErr_Format(PyExc_RuntimeError,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "ffi_prep_closure failed with %d", result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Modules/_ctypes/callproc.c.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Modules/_ctypes/callproc.c 2021-06-02 06:10:03.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -57,6 +57,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "Python.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "structmember.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <stdbool.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef MS_WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <windows.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <tchar.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -64,6 +66,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "ctypes_dlfcn.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <mach-o/dyld.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef MS_WIN32
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <malloc.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -754,7 +760,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffi_type **atypes,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffi_type *restype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void *resmem,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int argcount)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int argcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int argtypecount)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyThreadState *_save = NULL; /* For Py_BLOCK_THREADS and Py_UNBLOCK_THREADS */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyObject *error_object = NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -780,14 +787,70 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((flags & FUNCFLAG_CDECL) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cc = FFI_STDCALL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (FFI_OK != ffi_prep_cif(&cif,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cc,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- argcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- restype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- atypes)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- PyErr_SetString(PyExc_RuntimeError,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- "ffi_prep_cif failed");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if USING_APPLE_OS_LIBFFI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define HAVE_FFI_PREP_CIF_VAR_RUNTIME __builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# elif HAVE_FFI_PREP_CIF_VAR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define HAVE_FFI_PREP_CIF_VAR_RUNTIME true
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# define HAVE_FFI_PREP_CIF_VAR_RUNTIME false
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ /* Even on Apple-arm64 the calling convention for variadic functions conincides
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * with the standard calling convention in the case that the function called
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * only with its fixed arguments. Thus, we do not need a special flag to be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * set on variadic functions. We treat a function as variadic if it is called
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * with a nonzero number of variadic arguments */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ bool is_variadic = (argtypecount != 0 && argcount > argtypecount);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (void) is_variadic;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__APPLE__) && defined(__arm64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (is_variadic) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (HAVE_FFI_PREP_CIF_VAR_RUNTIME) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyErr_SetString(PyExc_NotImplementedError, "ffi_prep_cif_var() is missing");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if HAVE_FFI_PREP_CIF_VAR
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (is_variadic) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (HAVE_FFI_PREP_CIF_VAR_RUNTIME) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (FFI_OK != ffi_prep_cif_var(&cif,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cc,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argtypecount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ restype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ atypes)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyErr_SetString(PyExc_RuntimeError,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "ffi_prep_cif_var failed");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (FFI_OK != ffi_prep_cif(&cif,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cc,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ restype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ atypes)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyErr_SetString(PyExc_RuntimeError,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "ffi_prep_cif failed");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (FFI_OK != ffi_prep_cif(&cif,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ cc,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ argcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ restype,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ atypes)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyErr_SetString(PyExc_RuntimeError,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "ffi_prep_cif failed");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return -1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (flags & (FUNCFLAG_USE_ERRNO | FUNCFLAG_USE_LASTERROR)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1187,9 +1250,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (-1 == _call_function_pointer(flags, pProc, avalues, atypes,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rtype, resbuf,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Py_SAFE_DOWNCAST(argcount,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Py_ssize_t,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_SAFE_DOWNCAST(argcount, Py_ssize_t, int),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_SAFE_DOWNCAST(argtype_count, Py_ssize_t, int)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto cleanup;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef WORDS_BIGENDIAN
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1341,6 +1403,42 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++static PyObject *py_dyld_shared_cache_contains_path(PyObject *self, PyObject *args)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyObject *name, *name2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ char *name_str;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (__builtin_available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int r;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (!PyArg_ParseTuple(args, "O", &name))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (name == Py_None)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_RETURN_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (PyUnicode_FSConverter(name, &name2) == 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ name_str = PyBytes_AS_STRING(name2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ r = _dyld_shared_cache_contains_path(name_str);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_DECREF(name2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (r) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_RETURN_TRUE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Py_RETURN_FALSE;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ PyErr_SetString(PyExc_NotImplementedError, "_dyld_shared_cache_contains_path symbol is missing");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return NULL;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static PyObject *py_dl_open(PyObject *self, PyObject *args)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyObject *name, *name2;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1805,6 +1903,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return Py_BuildValue("siN", dict->format, dict->ndim, shape);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PyMethodDef _ctypes_module_methods[] = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"get_errno", get_errno, METH_NOARGS},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"set_errno", set_errno, METH_VARARGS},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1827,6 +1927,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"dlclose", py_dl_close, METH_VARARGS, "dlclose a library"},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"dlsym", py_dl_sym, METH_VARARGS, "find symbol in shared library"},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {"_dyld_shared_cache_contains_path", py_dyld_shared_cache_contains_path, METH_VARARGS, "check if path is in the shared cache"},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"alignment", align_func, METH_O, alignment_doc},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"sizeof", sizeof_func, METH_O, sizeof_doc},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {"byref", byref, METH_VARARGS, byref_doc},
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Modules/_ctypes/ctypes.h.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Modules/_ctypes/ctypes.h 2021-06-02 06:11:40.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -366,6 +366,14 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern PyObject *ComError;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if USING_MALLOC_CLOSURE_DOT_C
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void Py_ffi_closure_free(void *p);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void *Py_ffi_closure_alloc(size_t size, void** codeloc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define Py_ffi_closure_free ffi_closure_free
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define Py_ffi_closure_alloc ffi_closure_alloc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Local Variables:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ compile-command: "python setup.py -q build install --home ~"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Modules/_ctypes/malloc_closure.c.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Modules/_ctypes/malloc_closure.c 2021-06-02 06:12:42.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -89,16 +89,35 @@ static void more_core(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /******************************************************************/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* put the item back into the free list */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void ffi_closure_free(void *p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void Py_ffi_closure_free(void *p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if HAVE_FFI_CLOSURE_ALLOC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if USING_APPLE_OS_LIBFFI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_closure_free(p);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if USING_APPLE_OS_LIBFFI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ITEM *item = (ITEM *)p;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ item->next = free_list;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ free_list = item;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* return one item from the free list, allocating more if needed */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-void *ffi_closure_alloc(size_t ignored, void** codeloc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void *Py_ffi_closure_alloc(size_t size, void** codeloc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if HAVE_FFI_CLOSURE_ALLOC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if USING_APPLE_OS_LIBFFI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (__builtin_available(macos 10.15, ios 13, watchos 6, tvos 13, *)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return ffi_closure_alloc(size, codeloc);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if USING_APPLE_OS_LIBFFI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ITEM *item;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!free_list)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ more_core();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- Modules/_decimal/libmpdec/mpdecimal.h.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ Modules/_decimal/libmpdec/mpdecimal.h 2021-06-02 06:14:03.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -135,6 +135,9 @@ const char *mpd_version(void);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif defined(__x86_64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define CONFIG_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define ASM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #elif defined(__arm64__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #define CONFIG_64
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ #define ANSI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #error "unknown architecture for universal build."
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- configure.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ configure 2021-06-02 06:21:14.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1490,7 +1490,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-universal-archs=ARCH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select architectures for universal build ("32-bit",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "64-bit", "3-way", "intel", "intel-32", "intel-64",
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- or "all")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ "universal2", or "all")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ --with-framework-name=FRAMEWORK
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ specify an alternate name of the framework built
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ with --enable-framework
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6899,7 +6899,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-# The -arch flags for universal builds on OSX
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# The -arch flags for universal builds on macOS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UNIVERSAL_ARCH_FLAGS=
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7427,6 +7427,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ universal2)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ UNIVERSAL_ARCH_FLAGS="-arch arm64 -arch x86_64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LIPO_32BIT_FLAGS=""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ARCH_RUN_32BIT="true"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ intel)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIPO_32BIT_FLAGS="-extract i386"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -7448,7 +7453,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ esac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -9240,7 +9245,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MACOSX_DEFAULT_ARCH="ppc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ esac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -9255,7 +9260,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MACOSX_DEFAULT_ARCH="arm64"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ as_fn_error $? "Unexpected output of 'arch' on macOS" "$LINENO" 5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ;;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ esac
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -11808,6 +11813,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _dyld_shared_cache_contains_path" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$as_echo_n "checking for _dyld_shared_cache_contains_path... " >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* end confdefs.h. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <mach-o/dyld.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++int
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++main ()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void *x=_dyld_shared_cache_contains_path
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_ACEOF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++if ac_fn_c_try_compile "$LINENO"; then :
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$as_echo "#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1" >>confdefs.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$as_echo "yes" >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++$as_echo "no" >&6; }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++fi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # On some systems (eg. FreeBSD 5), we would find a definition of the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # functions ctermid_r, setgroups in the library, but no prototype
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- pyconfig.h.in.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ pyconfig.h.in 2021-06-02 06:26:35.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -725,6 +725,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Define if you have the 'prlimit' functions. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #undef HAVE_PRLIMIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Define if you have the '_dyld_shared_cache_contains_path' function. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#undef HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Define to 1 if you have the <process.h> header file. */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #undef HAVE_PROCESS_H
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- setup.py.orig 2021-02-16 12:29:22.000000000 +1100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ setup.py 2021-06-02 07:13:42.000000000 +1000
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -6,6 +6,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import importlib._bootstrap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import importlib.util
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ import sysconfig
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++import _osx_support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from distutils import log
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ from distutils.errors import *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -114,31 +115,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if m is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ MACOS_SDK_ROOT = m.group(1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MACOS_SDK_ROOT = '/'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- cc = sysconfig.get_config_var('CC')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- tmpfile = '/tmp/setup_sdk_root.%d' % os.getpid()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- os.unlink(tmpfile)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- except:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- pass
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ret = os.system('%s -E -v - </dev/null 2>%s 1>/dev/null' % (cc, tmpfile))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- in_incdirs = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- try:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ret >> 8 == 0:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- with open(tmpfile) as fp:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for line in fp.readlines():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if line.startswith("#include <...>"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- in_incdirs = True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- elif line.startswith("End of search list"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- in_incdirs = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- elif in_incdirs:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- line = line.strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if line == '/usr/include':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MACOS_SDK_ROOT = '/'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- elif line.endswith(".sdk/usr/include"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- MACOS_SDK_ROOT = line[:-12]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- finally:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- os.unlink(tmpfile)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ MACOS_SDK_ROOT = _osx_support._default_sysroot(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sysconfig.get_config_var('CC'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return MACOS_SDK_ROOT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -150,6 +128,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or path.startswith('/System/')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ or path.startswith('/Library/') )
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++def grep_headers_for(function, headers):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ for header in headers:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ with open(header, 'r', errors='surrogateescape') as f:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if function in f.read():
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def find_file(filename, std_dirs, paths):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ """Searches for the directory where a given file is located,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ and returns a possibly-empty list of additional directories, or None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1936,43 +1921,16 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # *** Uncomment these for TOGL extension only:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # -lGL -lGLU -lXext -lXmu \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- def configure_ctypes_darwin(self, ext):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # Darwin (OS X) uses preconfigured files, in
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # the Modules/_ctypes/libffi_osx directory.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- srcdir = sysconfig.get_config_var('srcdir')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ffi_srcdir = os.path.abspath(os.path.join(srcdir, 'Modules',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- '_ctypes', 'libffi_osx'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sources = [os.path.join(ffi_srcdir, p)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- for p in ['ffi.c',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'x86/darwin64.S',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'x86/x86-darwin.S',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'x86/x86-ffi_darwin.c',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'x86/x86-ffi64.c',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'powerpc/ppc-darwin.S',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'powerpc/ppc-darwin_closure.S',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'powerpc/ppc-ffi_darwin.c',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- 'powerpc/ppc64-darwin_closure.S',
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # Add .S (preprocessed assembly) to C compiler source extensions.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self.compiler.src_extensions.append('.S')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- include_dirs = [os.path.join(ffi_srcdir, 'include'),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- os.path.join(ffi_srcdir, 'powerpc')]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ext.include_dirs.extend(include_dirs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ext.sources.extend(sources)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def configure_ctypes(self, ext):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if not self.use_system_libffi:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if host_platform == 'darwin':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return self.configure_ctypes_darwin(ext)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- print('INFO: Could not locate ffi libs and/or headers')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def detect_ctypes(self, inc_dirs, lib_dirs):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- self.use_system_libffi = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (not sysconfig.get_config_var("LIBFFI_INCLUDEDIR") and host_platform == 'darwin'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self.use_system_libffi = True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ self.use_system_libffi = '--with-system-ffi' in sysconfig.get_config_var("CONFIG_ARGS")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include_dirs = []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extra_compile_args = []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extra_link_args = []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1985,7 +1943,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if host_platform == 'darwin':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sources.append('_ctypes/malloc_closure.c')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sources.append('_ctypes/darwin/dlfcn_simple.c')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ extra_compile_args.append('-DUSING_MALLOC_CLOSURE_DOT_C=1')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extra_compile_args.append('-DMACOSX')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ include_dirs.append('_ctypes/darwin')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # XXX Is this still needed?
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -2018,30 +1976,47 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ libraries=['m'])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self.extensions.extend([ext, ext_test])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_lib = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if host_platform == 'darwin':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if '--with-system-ffi' not in sysconfig.get_config_var("CONFIG_ARGS"):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # OS X 10.5 comes with libffi.dylib; the include files are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- # in /usr/include/ffi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- inc_dirs.append('/usr/include/ffi')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if not ffi_inc or ffi_inc[0] == '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ffi_inc = find_file('ffi.h', [], inc_dirs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ffi_inc is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ffi_h = ffi_inc[0] + '/ffi.h'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_in_sdk = os.path.join(macosx_sdk_root(), "usr/include/ffi")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if not ffi_inc:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if os.path.exists(ffi_in_sdk):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ext.extra_compile_args.append("-DUSING_APPLE_OS_LIBFFI=1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_inc = ffi_in_sdk
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_lib = 'ffi'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # OS X 10.5 comes with libffi.dylib; the include files are
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ # in /usr/include/ffi
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ inc_dirs.append('/usr/include/ffi')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if not ffi_inc:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ found = find_file('ffi.h', [], ffi_inc_dirs)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if found:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_inc = found[0]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ffi_inc:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_h = ffi_inc + '/ffi.h'
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not os.path.exists(ffi_h):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffi_inc = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ print('Header file {} does not exist'.format(ffi_h))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ffi_lib = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ffi_inc is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ffi_lib is None and ffi_inc:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for lib_name in ('ffi', 'ffi_pic'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (self.compiler.find_library_file(lib_dirs, lib_name)):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ffi_lib = lib_name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ffi_inc and ffi_lib:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ext.include_dirs.extend(ffi_inc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ffi_headers = glob(os.path.join(ffi_inc, '*.h'))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if grep_headers_for('ffi_prep_cif_var', ffi_headers):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CIF_VAR=1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if grep_headers_for('ffi_prep_closure_loc', ffi_headers):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ext.extra_compile_args.append("-DHAVE_FFI_PREP_CLOSURE_LOC=1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if grep_headers_for('ffi_closure_alloc', ffi_headers):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ext.extra_compile_args.append("-DHAVE_FFI_CLOSURE_ALLOC=1")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ext.include_dirs.append(ffi_inc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ext.libraries.append(ffi_lib)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self.use_system_libffi = True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/python37/files/patch-setup.py.diff b/lang/python37/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;color:#808080;'>index de50929f30d..27216b4512d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/python37/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/python37/files/patch-setup.py.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,11 +31,3 @@
</span>
# Assume we haven't found any of the libraries or include files
# The versions with dots are used on Unix, and the versions without
<span style='display:block; white-space:pre;background:#ffe0e0;'>-@@ -1983,7 +1979,6 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- return
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # OS X 10.5 comes with libffi.dylib; the include files are
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- # in /usr/include/ffi
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-- inc_dirs.append('/usr/include/ffi')
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ffi_inc = [sysconfig.get_config_var("LIBFFI_INCLUDEDIR")]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if not ffi_inc or ffi_inc[0] == '':
</span></pre><pre style='margin:0'>
</pre>