43 lines
1.6 KiB
Diff
43 lines
1.6 KiB
Diff
From 24f48fa793464470849a88fc99f06bf13e502710 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 8e6bbfd..ab6264a 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -7469,7 +7469,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 f155c3b..8d2e251 100644
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -1372,10 +1372,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):
|