summarylogtreecommitdiffstats
path: root/0091-fix-build-testinternalcapi.patch
blob: 1a3648a5f2e878882441f3698157f2914f87448a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From c7083b0b392333103cf09f4f33d66f07b0b5ac18 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 091/N] fix build testinternalcapi

---
 setup.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/setup.py b/setup.py
index 14e1396..0ce4714 100644
--- a/setup.py
+++ b/setup.py
@@ -978,7 +978,11 @@ class PyBuildExt(build_ext):
                            depends=['testcapi_long.h']))
 
         # 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
-- 
2.32.0