#!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 include /usr/share/dpkg/default.mk export DEB_HOST_MULTIARCH PY3VERS := $(shell py3versions -v --default | tac -s' ') %: dh $@ --with python3 --buildsystem=cmake execute_before_dh_clean: rm -rf .pybuild rm -rf python/build rm -rf python/dolfinx_mpc.egg-info rm -rf python/LICENSE rm -rf python/.pytest_cache override_dh_auto_configure: dh_auto_configure --sourcedir=cpp execute_after_dh_auto_install: cp LICENSE python LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \ CMAKE_PREFIX_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake \ pybuild --dir=$(CURDIR)/python --name=dolfinx_mpc --disable test ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) execute_before_dh_python3: cd python/tests; \ for pyver in $(PY3VERS); do \ LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \ PYTHONPATH=$(CURDIR)/debian/python3-dolfinx-mpc/usr/lib/python$${pyver}/dist-packages \ XDG_CACHE_HOME=$(CURDIR)/.pybuild/.cache \ python$${pyver} -m pytest $(PYTEST_OPTIONS); \ done rm -rf python/tests/__pycache__ endif