From 4d5570bea6ac74c12ad3a17a6e166f39877b5018 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Wed, 10 Sep 2014 17:37:57 +0100 Subject: [PATCH] Disable parallel builds to avoid issue with Pillow 2.5 monkeypatching the build process --- setup.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index c29f21df2f..351a31ff8e 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import sys +import sys, os try: @@ -9,16 +9,19 @@ except ImportError: from distutils.core import setup -# Hack to prevent stupid TypeError: 'NoneType' object is not callable error on -# exit of python setup.py test # in multiprocessing/util.py _exit_function when -# running python setup.py test (see -# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html) +# Hack to prevent "TypeError: 'NoneType' object is not callable" error +# in multiprocessing/util.py _exit_function when setup.py exits +# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html) try: import multiprocessing except ImportError: pass +# Disable parallel builds, because Pillow 2.5.3 does some crazy monkeypatching of +# the build process on multicore systems, which breaks installation of libsass +os.environ['MAX_CONCURRENCY'] = '1' + PY3 = sys.version_info[0] == 3