1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
export PYBUILD_NAME=qutip
PY3VER_DEFAULT=$(shell py3versions -d -v)
# disable build tests for these arches:
# mips64el consistently times out on test_ssesolve_homodyne_methods
# armel tests run slow (>24 hrs) and ultimately test_pseudo_inverse[dense_numpy] segfaults
ARCH_NO_TEST_LIST = mips64el armel
empty :=
space := $(empty)$(empty)
# run tests, or not
RUNTEST=yes
ifneq (,$(findstring $(space)$(DEB_HOST_ARCH)$(space), $(space)$(ARCH_NO_TEST_LIST)$(space)))
RUNTEST=no
endif
ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
RUNTEST=no
endif
%:
dh $@ --with python3,sphinxdoc --buildsystem=pybuild
execute_after_dh_clean:
rm -f doc/expect.dat
rm -rf doc/gallery/build
find . -name *cpp ! -name zspmv_openmp.cpp ! -name matmul_*_vector.cpp -delete
execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep:
mkdir -p $(CURDIR)/.pybuild/doc
HOME=$(CURDIR)/.pybuild/doc \
PYTHONPATH=$(CURDIR)/.pybuild/cpython3_$(PY3VER_DEFAULT)_$(PYBUILD_NAME)/build \
make -C doc html BUILDDIR=$(CURDIR)/.pybuild/doc
override_dh_auto_test:
if [ "$(RUNTEST)" = "no" ]; then \
echo Build tests have been disabled; \
else \
for PY3 in `py3versions -s -v`; do \
echo "--- Testing with python$$PY3 ---"; \
builddir=`pybuild -p $$PY3 --print build_dir | awk '{print $$3}'`; \
testdir=$${builddir}-test; \
cp -ra $$builddir $$testdir; \
cd $$testdir; \
HOME=$(CURDIR)/.pybuild PYTHONPATH=$$testdir \
python$$PY3 -mpytest qutip/tests -k "not test_simdiag"; \
cd $(CURDIR); \
done || /bin/true; \
fi
# setup.py clean creates build files instead of removing them
# https://github.com/qutip/qutip/issues/986
execute_after_dh_auto_clean:
rm -f qutip/control/*cpp qutip/cy/*.cpp qutip/cy/openmp/*.cpp qutip/version.py
execute_after_dh_python3:
dh_numpy3
execute_after_dh_fixperms-arch:
for f in cy/openmp/src/zspmv_openmp.hpp data/src/matmul_csr_vector.hpp; do \
chmod a-x debian/python3-qutip/usr/lib/python3/dist-packages/qutip/core/$$f; \
done
|