summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorJesse Noller <jnoller@gmail.com>2009-04-02 00:03:28 (GMT)
committerJesse Noller <jnoller@gmail.com>2009-04-02 00:03:28 (GMT)
commit355b1264b80506dddb536dc338ed91e061032309 (patch)
tree369f499e21aa30d3f8c89ee0d491b21f49a85907 /setup.py
parente9d35ef2304247c001340fdab7379cea99edd4d7 (diff)
downloadcpython-355b1264b80506dddb536dc338ed91e061032309.zip
cpython-355b1264b80506dddb536dc338ed91e061032309.tar.gz
cpython-355b1264b80506dddb536dc338ed91e061032309.tar.bz2
issue5545: Switch to Autoconf for multiprocessing; special thanks to Martin Lowis for help
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py42
1 files changed, 7 insertions, 35 deletions
diff --git a/setup.py b/setup.py
index d3b39ba..dbbbd57 100644
--- a/setup.py
+++ b/setup.py
@@ -1245,56 +1245,29 @@ class PyBuildExt(build_ext):
libraries = ['ws2_32']
elif platform == 'darwin': # Mac OSX
- macros = dict(
- HAVE_SEM_OPEN=1,
- HAVE_SEM_TIMEDWAIT=0,
- HAVE_FD_TRANSFER=1,
- HAVE_BROKEN_SEM_GETVALUE=1
- )
+ macros = dict()
libraries = []
elif platform == 'cygwin': # Cygwin
- macros = dict(
- HAVE_SEM_OPEN=1,
- HAVE_SEM_TIMEDWAIT=1,
- HAVE_FD_TRANSFER=0,
- HAVE_BROKEN_SEM_UNLINK=1
- )
+ macros = dict()
libraries = []
elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
# FreeBSD's P1003.1b semaphore support is very experimental
# and has many known problems. (as of June 2008)
- macros = dict( # FreeBSD
- HAVE_SEM_OPEN=0,
- HAVE_SEM_TIMEDWAIT=0,
- HAVE_FD_TRANSFER=1,
- )
+ macros = dict()
libraries = []
elif platform.startswith('openbsd'):
- macros = dict( # OpenBSD
- HAVE_SEM_OPEN=0, # Not implemented
- HAVE_SEM_TIMEDWAIT=0,
- HAVE_FD_TRANSFER=1,
- )
+ macros = dict()
libraries = []
elif platform.startswith('netbsd'):
- macros = dict( # at least NetBSD 5
- HAVE_SEM_OPEN=1,
- HAVE_SEM_TIMEDWAIT=0,
- HAVE_FD_TRANSFER=1,
- HAVE_BROKEN_SEM_GETVALUE=1
- )
+ macros = dict()
libraries = []
else: # Linux and other unices
- macros = dict(
- HAVE_SEM_OPEN=1,
- HAVE_SEM_TIMEDWAIT=1,
- HAVE_FD_TRANSFER=1
- )
+ macros = dict()
libraries = ['rt']
if platform == 'win32':
@@ -1309,8 +1282,7 @@ class PyBuildExt(build_ext):
multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c',
'_multiprocessing/socket_connection.c'
]
-
- if macros.get('HAVE_SEM_OPEN', False):
+ if sysconfig.get_config_var('HAVE_SEM_OPEN'):
multiprocessing_srcs.append('_multiprocessing/semaphore.c')
if sysconfig.get_config_var('WITH_THREAD'):