summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-10-08 20:23:32 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-10-28 22:24:40 +0100
commit23d546176e2fe0b4d7d2e9100032bbf8107927e1 (patch)
tree3903771cf6e196eed35083f871b09aa98408fec3 /tools
parent7be18edfaae4d0ba6a888160d1cc57c453b568f2 (diff)
downloadnumpy-23d546176e2fe0b4d7d2e9100032bbf8107927e1.tar.gz
ENH: support parallel compilation of extensions
Allow extensions using numpy.distutils to compile in parallel. By passing `--jobs=n` or `-j n` to `setup.py build` the compilation of extensions is now performed in `n` parallel processes. Additionally the environment variable NPY_NUM_BUILD_JOBS is used as the default value, if its unset the default is serial compilation. The parallelization is limited to within the files of an extension, so only numpy multiarraymodule really profits but its still a nice improvement when you have 2-4 cores. Unfortunately Cython will not profit at all as it tends to build one module per file.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/travis-test.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index 17d520891..3981c3b58 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -1,6 +1,9 @@
#!/bin/sh
set -ex
+# travis boxes give you 1.5 cpus
+export NPY_NUM_BUILD_JOBS=2
+
# setup env
if [ -r /usr/lib/libeatmydata/libeatmydata.so ]; then
# much faster package installation