]> granicus.if.org Git - python/commitdiff
Issue 3807: multiprocessing fails to compile under --without-threads
authorJesse Noller <jnoller@gmail.com>
Fri, 23 Jan 2009 14:04:41 +0000 (14:04 +0000)
committerJesse Noller <jnoller@gmail.com>
Fri, 23 Jan 2009 14:04:41 +0000 (14:04 +0000)
Misc/NEWS
setup.py

index 204ea809158630175217cffa9ee16065918990b3..52693202919fe14951ed574e9516fd4f0e906874 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -145,6 +145,10 @@ Core and Builtins
 Library
 -------
 
+- Issue #3807: _multiprocessing build fails when configure is passed 
+  --without-threads argument. When this occurs, _multiprocessing will
+  be disabled, and not compiled.
+
 - Issue #5008: When a file is opened in append mode with the new IO library,
   do an explicit seek to the end of file (so that e.g. tell() returns the
   file size rather than 0). This is consistent with the behaviour of the
index 0948e67538c707689b3c892c28640c98782c97cd..1aa14d127dab81d1b95068c3b56c15b10a97056f 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1315,9 +1315,13 @@ class PyBuildExt(build_ext):
             if macros.get('HAVE_SEM_OPEN', False):
                 multiprocessing_srcs.append('_multiprocessing/semaphore.c')
 
-        exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
-                                 define_macros=macros.items(),
-                                 include_dirs=["Modules/_multiprocessing"]))
+        if sysconfig.get_config_var('WITH_THREAD'):
+            exts.append ( Extension('_multiprocessing', multiprocessing_srcs,
+                                    define_macros=macros.items(),
+                                    include_dirs=["Modules/_multiprocessing"]))
+        else:
+            missing.append('_multiprocessing')
+
         # End multiprocessing