Flush at the end of cythonize().
authorRobert Bradshaw <robertwb@google.com>
Tue, 19 Mar 2013 17:29:22 +0000 (10:29 -0700)
committerRobert Bradshaw <robertwb@google.com>
Tue, 19 Mar 2013 17:29:22 +0000 (10:29 -0700)
Cython/Build/Dependencies.py

index b67a6aa..2c84b60 100644 (file)
@@ -693,6 +693,9 @@ def cythonize(module_list, exclude=[], nthreads=0, aliases=None, quiet=False, fo
             module_list.remove(module)
     if hasattr(options, 'cache'):
         cleanup_cache(options.cache, getattr(options, 'cache_size', 1024 * 1024 * 100))
+    # cythonize() is often followed by the (non-Python-buffered)
+    # compiler output, flush now to avoid interleaving output.
+    sys.stdout.flush()
     return module_list
 
 # TODO: Share context? Issue: pyx processing leaks into pxd module