#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE = 1 export DEB_BUILD_MAINT_OPTIONS = hardening=+all include /usr/share/dpkg/pkg-info.mk UPSTREAM_VERSION = $(shell echo $(DEB_VERSION_UPSTREAM) | sed -e 's/\+.*//') export SETUPTOOLS_SCM_PRETEND_VERSION = $(UPSTREAM_VERSION) export MPLBACKEND=Agg export PYBUILD_NAME = cartopy export PYBUILD_INSTALL_ARGS = --install-data=/usr/share/cartopy export PYBUILD_TEST_PYTEST = 1 # Testing is restricted to test cases which do not require network access. # See: https://github.com/SciTools/cartopy/issues/797. # Testing of the plot feature (cartopy/tests/mpl/*) is disabled due to a bug in # the matplotlib Debian package. See Bug-Debian #838301. export PYBUILD_TEST_ARGS = --pyargs -v -m "not network and not natural_earth" cartopy/ %: dh $@ --buildsystem=pybuild override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifneq (,$(filter $(DEB_BUILD_ARCH),mips64el s390x ppc64)) dh_auto_test || echo "Ignoring test failures" else dh_auto_test endif endif execute_before_dh_auto_install: mkdir -p debian/python-cartopy-data/usr/share/cartopy/data execute_after_dh_auto_install: $(RM) -r debian/python3-cartopy/usr/lib/python3*/dist-packages/cartopy/data $(RM) -r debian/python3-cartopy/usr/lib/python3*/dist-packages/cartopy/tests/mpl/baseline_images # Remove extra license files $(RM) debian/*/usr/lib/python*/dist-packages/*/COPYING $(RM) debian/*/usr/lib/python*/dist-packages/*/COPYING.LESSER # Don't include test output $(RM) -r debian/*/usr/lib/python*/dist-packages/cartopy_test_output override_dh_python3: dh_python3 -p python3-cartopy override_dh_numpy3: dh_numpy3 -p python3-cartopy