summarylogtreecommitdiffstats
path: root/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
diff options
context:
space:
mode:
authoratomlong2021-08-28 11:19:04 +0800
committeratomlong2021-08-28 13:15:13 +0800
commit89a67c05174951d172252b1db96ff93cc4ec4bcd (patch)
treed8c39fa79b201cf9aea28c51e7446a252ed8fee4 /0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
parentcf8d8d8771493a2aa8370ed323d06dc733a84181 (diff)
downloadaur-89a67c05174951d172252b1db96ff93cc4ec4bcd.tar.gz
Update to 3.9.6
Diffstat (limited to '0020-MINGW-setup-_ctypes-module-with-system-libffi.patch')
-rw-r--r--0020-MINGW-setup-_ctypes-module-with-system-libffi.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch b/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
new file mode 100644
index 000000000000..3006e0ebd88d
--- /dev/null
+++ b/0020-MINGW-setup-_ctypes-module-with-system-libffi.patch
@@ -0,0 +1,45 @@
+From 63b12b21aae2268da35cd557e526b241a65198c2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9?=
+ <alexey.pawlow@gmail.com>
+Date: Thu, 17 Jun 2021 18:51:30 +0530
+Subject: [PATCH 020/N] MINGW setup _ctypes module with system libffi
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Co-authored-by: Алексей <alexey.pawlow@gmail.com>
+Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
+---
+ setup.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index a6145c4..e36ef5d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -2149,9 +2149,12 @@ class PyBuildExt(build_ext):
+ self.add(ext)
+ if TEST_EXTENSIONS:
+ # function my_sqrt() needs libm for sqrt()
++ ffi_test_libs = ['m']
++ if MS_WINDOWS:
++ ffi_test_libs += ['oleaut32']
+ self.add(Extension('_ctypes_test',
+ sources=['_ctypes/_ctypes_test.c'],
+- libraries=['m']))
++ libraries=ffi_test_libs))
+
+ ffi_inc = sysconfig.get_config_var("LIBFFI_INCLUDEDIR")
+ ffi_lib = None
+@@ -2196,6 +2199,8 @@ class PyBuildExt(build_ext):
+
+ ext.include_dirs.append(ffi_inc)
+ ext.libraries.append(ffi_lib)
++ if MS_WINDOWS:
++ ext.libraries.extend(['ole32', 'oleaut32', 'uuid'])
+ self.use_system_libffi = True
+
+ if sysconfig.get_config_var('HAVE_LIBDL'):
+--
+2.32.0
+