#!/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