#!/usr/bin/make -f UPSTREAM_GIT := https://github.com/pysal/momepy include /usr/share/openstack-pkg-tools/pkgos.make export SETUPTOOLS_SCM_PRETEND_VERSION=$(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~git.*//' -e 's/~bpo.*//' -e 's/~/.0/' -e 's/+dfsg1//' -e 's/+ds1//' | head -n 1) export PYBUILD_NAME=monepy export PYBUILD_TEST_ARGS=momepy/tests -v -k 'not test_Theil and not test_Gini and not test_Alignment' %: dh $@ --buildsystem=pybuild --with python3,sphinxdoc override_dh_auto_clean: rm -rf build .stestr *.egg-info docs/generated rm -rf debian/python3-monepy find . -iname '*.pyc' -delete for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done dh_auto_clean override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=. python3 -m sphinx -b html docs debian/python-momepy-doc/usr/share/doc/python-momepy-doc/html dh_sphinxdoc endif # Not sure why, but this package doesn't get installed automatically... :/ # Let's get it in manually. override_dh_auto_install: dh_auto_install mkdir -p $(CURDIR)/debian/python3-momepy/usr/lib/python3/dist-packages cp -axuf .pybuild/cpython3_`py3versions -dv`_monepy/build/momepy* $(CURDIR)/debian/python3-momepy/usr/lib/python3/dist-packages