#!/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 export PYBUILD_BUILD_ARGS=--config-setting="--build-option=--with-openmp" 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_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 -c "import qutip.testing; qutip.testing.run(pytest_options=[['-k', 'not test_qubit[power-gmres]']])"; \ 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/version.py execute_after_dh_python3: dh_numpy3 execute_after_dh_fixperms-arch: for f in openmp/benchmark.pyx openmp/src/zspmv_openmp.hpp src/zspmv.hpp; do \ chmod a-x debian/python3-qutip/usr/lib/python3/dist-packages/qutip/cy/$$f; \ done