summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorDavin Potts <applio@users.noreply.github.com>2019-02-02 04:52:23 (GMT)
committerGitHub <noreply@github.com>2019-02-02 04:52:23 (GMT)
commite5ef45b8f519a9be9965590e1a0a587ff584c180 (patch)
tree261723cf76fbc9ef042b8ad4a3a6a581c7ae603c /setup.py
parentd2b4c19d53f5f021fb1c7c32d48033a92ac4fe49 (diff)
downloadcpython-e5ef45b8f519a9be9965590e1a0a587ff584c180.zip
cpython-e5ef45b8f519a9be9965590e1a0a587ff584c180.tar.gz
cpython-e5ef45b8f519a9be9965590e1a0a587ff584c180.tar.bz2
bpo-35813: Added shared_memory submodule of multiprocessing. (#11664)
Added shared_memory submodule to multiprocessing in time for first alpha with cross-platform tests soon to follow.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 44a563b..d54bbe0 100644
--- a/setup.py
+++ b/setup.py
@@ -1592,6 +1592,17 @@ class PyBuildExt(build_ext):
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 (self.compiler.find_library_file(lib_dirs, 'rt') or
+ host_platform != 'cygwin'):
+ posixshmem_srcs = [ '_multiprocessing/posixshmem.c',
+ ]
+ libs = []
+ if self.compiler.find_library_file(lib_dirs, 'rt'):
+ libs.append('rt')
+ exts.append( Extension('_posixshmem', posixshmem_srcs,
+ define_macros={},
+ libraries=libs,
+ include_dirs=["Modules/_multiprocessing"]))
exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
define_macros=list(macros.items()),