diff options
author | atomlong | 2021-10-23 17:55:22 +0800 |
---|---|---|
committer | atomlong | 2021-10-23 18:06:15 +0800 |
commit | 80096c8de4b34ec1ed8f30bb428918cd592b2424 (patch) | |
tree | b48dd1e73de9ea35a4709fb6b93deb16331ec514 /0105-ctypes-find_library-c-should-return-None-with-ucrt.patch | |
parent | 89a67c05174951d172252b1db96ff93cc4ec4bcd (diff) | |
download | aur-80096c8de4b34ec1ed8f30bb428918cd592b2424.tar.gz |
update to 3.9.7
Diffstat (limited to '0105-ctypes-find_library-c-should-return-None-with-ucrt.patch')
-rw-r--r-- | 0105-ctypes-find_library-c-should-return-None-with-ucrt.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/0105-ctypes-find_library-c-should-return-None-with-ucrt.patch b/0105-ctypes-find_library-c-should-return-None-with-ucrt.patch new file mode 100644 index 000000000000..1352c0210ada --- /dev/null +++ b/0105-ctypes-find_library-c-should-return-None-with-ucrt.patch @@ -0,0 +1,41 @@ +From bf97e2d2da502effd0116a00d4a02a69b7a9c2a9 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter <reiter.christoph@gmail.com> +Date: Fri, 23 Jul 2021 18:23:58 +0200 +Subject: [PATCH 105/N] ctypes: find_library('c') should return None with + ucrt + +Just like with MSVC. This fixes a test in test_ctypes. +--- + Lib/ctypes/util.py | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py +index 0c2510e..48ddb3b 100644 +--- a/Lib/ctypes/util.py ++++ b/Lib/ctypes/util.py +@@ -31,6 +31,12 @@ if os.name == "nt": + # else we don't know what version of the compiler this is + return None + ++ def find_msvcrt_mingw(): ++ is_ucrt = 'clang' in sys.version.lower() or 'ucrt' in sys.version.lower() ++ if is_ucrt: ++ return None ++ return 'msvcrt.dll' ++ + def find_msvcrt(): + """Return the name of the VC runtime dll""" + version = _get_build_version() +@@ -54,6 +60,9 @@ if os.name == "nt": + + def find_library(name): + if name in ('c', 'm'): ++ import sysconfig ++ if sysconfig.get_platform().startswith('mingw'): ++ return find_msvcrt_mingw() + return find_msvcrt() + # See MSDN for the REAL search order. + for directory in os.environ['PATH'].split(os.pathsep): +-- +2.33.0 + |