#!/usr/bin/make -f # -*- makefile -*- include /usr/share/dpkg/pkg-info.mk # Copy/generate three artifacts needed by the test suite export PYBUILD_NAME=xmlschema define PYBUILD_BEFORE_TEST cp setup.py {build_dir}/ mkdir {build_dir}/doc cp doc/conf.py {build_dir}/doc/ endef export PYBUILD_BEFORE_TEST export PYBUILD_AFTER_TEST=rm -f {build_dir}/setup.py {build_dir}/doc/conf.py %: dh $@ --with python3,sphinxdoc --buildsystem=pybuild override_dh_auto_build: export http_proxy='127.0.0.1:9' override_dh_auto_build: export https_proxy='127.0.0.1:9' override_dh_auto_build: dh_auto_build ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) PYTHONPATH=$(CURDIR) $(MAKE) -C doc html endif override_dh_auto_install: dh_auto_install for CMD in xmlschema-json2xml xmlschema-validate xmlschema-xml2json ; \ do \ PYTHONPATH=debian/python3-xmlschema/usr/lib/$(shell py3versions -d)/dist-packages/ \ help2man \ --version-string $(DEB_VERSION_UPSTREAM) \ --no-info \ --output $$CMD.1 \ --name "REPLACE" \ debian/python3-xmlschema/usr/bin/$$CMD ;\ done sed -i -e 's/REPLACE/XML to JSON converter/' xmlschema-xml2json.1 sed -i -e 's/REPLACE/XML validator/' xmlschema-validate.1 sed -i -e 's/REPLACE/JSON to XML converter/' xmlschema-json2xml.1 override_dh_installdocs: dh_installdocs --package=python-xmlschema-doc --doc-main-package=python3-xmlschema dh_installdocs --remaining-packages override_dh_auto_clean: dh_auto_clean rm -rf doc/_build rm -f unicode_categories.json xmlschema/unicode_categories.json rm -f *.1 BUILDDIR = $(shell find . -name 'build') override_dh_auto_test: cp mypy.ini requirements-dev.txt $(BUILDDIR) dh_auto_test rm -f $(BUILDDIR)/mypy.ini $(BUILDDIR)/requirements-dev.txt