Skip to content

Commit

Permalink
include _multiprocessing/semaphore.c on win32
Browse files Browse the repository at this point in the history
while building `_multiprocessing` extension
also, always build that module on win32
  • Loading branch information
naveen521kk authored and lazka committed Jul 19, 2023
1 parent 452b0ce commit 4262bc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7443,7 +7443,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"],
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4262bc1

Please sign in to comment.