summarylogtreecommitdiffstats
path: root/0037-build-_winapi-earlier-so-we-can-use-it-in-distutils-.patch
blob: 61efc9189cfcdaa743c326e4539c2962ce47e86a (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
29
30
31
32
33
34
35
36
37
38
39
From fa3d5a352904467d12247164a7673033c5e95d2a Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Tue, 21 Sep 2021 21:13:57 +0200
Subject: [PATCH 037/N] build _winapi earlier so we can use it in distutils
 via subprocess

---
 Modules/Setup.config.in | 1 +
 setup.py                | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Modules/Setup.config.in b/Modules/Setup.config.in
index 825ce5d..b4e7ff7 100644
--- a/Modules/Setup.config.in
+++ b/Modules/Setup.config.in
@@ -12,4 +12,5 @@
 # build-in modules for windows platform:
 @USE_WIN32_MODULE@winreg ../PC/winreg.c
 @USE_WIN32_MODULE@msvcrt -DPy_BUILD_CORE ../PC/msvcrtmodule.c
+@USE_WIN32_MODULE@_winapi _winapi.c
 
diff --git a/setup.py b/setup.py
index c52fd3b..6a352af 100644
--- a/setup.py
+++ b/setup.py
@@ -1612,7 +1612,9 @@ class PyBuildExt(build_ext):
             self.add(Extension('msvcrt', [os.path.join(pc_srcdir, p)
                                for p in ['msvcrtmodule.c']]))
 
-            self.add(Extension('_winapi', ['_winapi.c']))
+            # Added to Setup.config.in as now needed earlier since I
+            # use subprocess (which uses Popen) in cygwinccompiler.py
+            # self.add(Extension('_winapi', ['_winapi.c']))
 
             self.add(Extension('_msi', [os.path.join(pc_srcdir, p)
                                for p in ['_msi.c']],
-- 
2.33.0