summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-11-04 20:13:13 +0100
committerStefan Behnel <stefan_ml@behnel.de>2017-11-04 20:13:13 +0100
commit40996b63e43bf53e69934a15625c8c977661be8c (patch)
treef28847b389d94de04cb83f434932b0fb2ad0c403 /Makefile
parentf3a33753a80b57ad1dd459b0c72a9426affd7954 (diff)
downloadpython-lxml-40996b63e43bf53e69934a15625c8c977661be8c.tar.gz
Run in-place build in parallel if possible.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 3bb45c5c..79a3b386 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@ TESTOPTS=
SETUPFLAGS=
LXMLVERSION=$(shell cat version.txt)
+PARALLEL=$(shell $(PYTHON) -c 'import sys; print("-j7" if sys.version_info >= (3, 5) else "")' )
+PARALLEL3=$(shell $(PYTHON3) -c 'import sys; print("-j7" if sys.version_info >= (3, 5) else "")' )
PYTHON_WITH_CYTHON=$(shell $(PYTHON) -c 'import Cython.Build.Dependencies' >/dev/null 2>/dev/null && echo " --with-cython" || true)
PY3_WITH_CYTHON=$(shell $(PYTHON3) -c 'import Cython.Build.Dependencies' >/dev/null 2>/dev/null && echo " --with-cython" || true)
CYTHON_WITH_COVERAGE=$(shell $(PYTHON) -c 'import Cython.Coverage; import sys; assert not hasattr(sys, "pypy_version_info")' >/dev/null 2>/dev/null && echo " --coverage" || true)
@@ -21,10 +23,10 @@ all: inplace
# Build in-place
inplace:
- $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i $(PYTHON_WITH_CYTHON) --warnings --with-coverage
+ $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i $(PYTHON_WITH_CYTHON) --warnings --with-coverage $(PARALLEL)
inplace3:
- $(PYTHON3) setup.py $(SETUPFLAGS) build_ext -i $(PY3_WITH_CYTHON) --warnings --with-coverage
+ $(PYTHON3) setup.py $(SETUPFLAGS) build_ext -i $(PY3_WITH_CYTHON) --warnings --with-coverage $(PARALLEL3)
rebuild-sdist: require-cython
rm -f dist/lxml-$(LXMLVERSION).tar.gz