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
|
#!/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=--with-openmp
# disable build tests for these arches:
# mips64el consistently times out on test_ssesolve_homodyne_methods
ARCH_NO_TEST_LIST = mips64el
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 --buildsystem=pybuild
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; \
PYTHONPATH=$$testdir python$$PY3 -m nose2 -v; \
cd $(CURDIR); \
done || /bin/true; \
fi
# setup.py clean creates build files instead of removing them
# https://github.com/qutip/qutip/issues/986
override_dh_auto_clean:
dh_auto_clean
rm -f qutip/control/*cpp qutip/cy/*.cpp qutip/version.py
override_dh_fixperms:
dh_fixperms
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
|