43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From eb7069001c94b86b4669825899c4eb5985a590a7 Mon Sep 17 00:00:00 2001
|
|
From: Naveen M K <naveen521kk@gmail.com>
|
|
Date: Fri, 23 Jun 2023 20:13:23 +0530
|
|
Subject: [PATCH 127/N] include `_multiprocessing/semaphore.c` on win32
|
|
|
|
while building `_multiprocessing` extension
|
|
also, always build that module on win32
|
|
---
|
|
configure.ac | 2 +-
|
|
setup.py | 4 ++--
|
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 815e6f1..98bef51 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -7470,7 +7470,7 @@ PY_STDLIB_MOD_SIMPLE([_zoneinfo])
|
|
|
|
dnl multiprocessing modules
|
|
PY_STDLIB_MOD([_multiprocessing],
|
|
- [], [test "$ac_cv_func_sem_unlink" = "yes"],
|
|
+ [], [test "$ac_cv_func_sem_unlink" = "yes" -o "$MACHDEP" = "win32"],
|
|
[-I\$(srcdir)/Modules/_multiprocessing])
|
|
PY_STDLIB_MOD([_posixshmem],
|
|
[], [test "$have_posix_shmem" = "yes"],
|
|
diff --git a/setup.py b/setup.py
|
|
index 7f16212..c6308cc 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -1373,10 +1373,10 @@ def detect_multiprocessing(self):
|
|
if (
|
|
sysconfig.get_config_var('HAVE_SEM_OPEN') and not
|
|
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')
|
|
- ):
|
|
+ ) or MS_WINDOWS:
|
|
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
|
|
self.addext(Extension('_multiprocessing', multiprocessing_srcs,
|
|
- libraries=(['ws2_32'] if MS_WINDOWS else None)))
|
|
+ libraries=(['ws2_32'] if MS_WINDOWS else None), include_dirs=["Modules/_multiprocessing"]))
|
|
self.addext(Extension('_posixshmem', ['_multiprocessing/posixshmem.c']))
|
|
|
|
def detect_uuid(self):
|