Files
MINGW-packages/mingw-w64-python/0075-fix-build-testinternalcapi.patch
2023-02-10 12:56:41 +01:00

26 lines
922 B
Diff

From ea835dd8e16ab3954e5d7e0d038aec75f0eef88c Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 17 Jun 2021 18:52:34 +0530
Subject: [PATCH 075/N] fix build testinternalcapi
---
setup.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/setup.py b/setup.py
index c381fb4..30f652a 100644
--- a/setup.py
+++ b/setup.py
@@ -1081,7 +1081,11 @@ class PyBuildExt(build_ext):
self.add(Extension('_testclinic', ['_testclinic.c']))
# Python Internal C API test module
+ macros = []
+ if MS_WINDOWS:
+ macros.append(('PY3_DLLNAME', 'L"%s"' % sysconfig.get_config_var('DLLLIBRARY')))
self.add(Extension('_testinternalcapi', ['_testinternalcapi.c'],
+ define_macros=macros,
extra_compile_args=['-DPy_BUILD_CORE_MODULE']))
# Python PEP-3118 (buffer protocol) test module