Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-35813: Added shared_memory submodule of multiprocessing. #11664

Merged
merged 8 commits into from
Feb 2, 2019
Prev Previous commit
Next Next commit
Fixed missing library dependency on linux and bsd systems other than …
…darwin.
  • Loading branch information
applio committed Feb 1, 2019
commit a1070ac400e28daea3c24b7e751d2c261b9781ff
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1592,11 +1592,16 @@ class db_found(Exception): pass
if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not
sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')):
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
if True: # TODO: add config for detecting POSIX shared memory
if (self.compiler.find_library_file(lib_dirs, 'rt') or
host_platform == 'darwin'):
posixshmem_srcs = [ '_multiprocessing/posixshmem.c',
]
libs = []
if host_platform != 'darwin':
libs.append('rt')
exts.append( Extension('_posixshmem', posixshmem_srcs,
define_macros={},
libraries=libs,
include_dirs=["Modules/_multiprocessing"]))

exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
Expand Down