#!/usr/bin/make -f DH_VERBOSE := 1 include /usr/share/dpkg/pkg-info.mk export PYBUILD_NAME=schema-salad #export PYBUILD_DISABLE=test export SCHEMA_SALAD_USE_MYPYC=1 export MYPYPATH=$(CURDIR)/mypy-stubs #export SETUPTOOLS_SCM_PRETEND_VERSION=${DEB_VERSION_UPSTREAM} %: dh $@ --buildsystem=pybuild execute_after_dh_auto_build: PYTHONPATH=. help2man --no-info \ --version-string=${DEB_VERSION_UPSTREAM} \ --no-discard-stderr \ --name="Schema Annotations for Linked Avro Data (SALAD)" \ python3\ -m\ schema_salad > debian/schema-salad-tool.1 sed -i 's/python3 -m schema_salad/schema-salad-tool/g' \ debian/schema-salad-tool.1 sed -i 's/__main__.py/schema-salad-tool/g' debian/schema-salad-tool.1 sed -i 's/PYTHON/SCHEMA-SALAD-TOOL/g' debian/schema-salad-tool.1 PYTHONPATH=. help2man --no-info \ --version-string=${DEB_VERSION_UPSTREAM} \ --no-discard-stderr \ --name="Schema Annotations for Linked Avro Data (SALAD)" \ python3\ -m\ schema_salad.makedoc > debian/schema-salad-doc.1 sed -i 's/python3 -m schema_salad.makedoc/schema-salad-doc/g' \ debian/schema-salad-doc.1 sed -i 's/__main__.py/schema-salad-doc/g' debian/schema-salad-doc.1 sed -i 's/PYTHON/SCHEMA-SALAD-DOC/g' debian/schema-salad-doc.1 find . -name "*.coverage" -delete override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) dh_auto_install PYBUILD_SYSTEM=custom \ PYBUILD_TEST_ARGS="cd {dir}; export PATH={destdir}/usr/bin:$$PATH ; \ cd {build_dir}; export PYTHONPATH=$$(pwd); {interpreter} -m pytest \ -rsfE -n auto -k 'not (test_secondaryFiles or test_outputBinding or test_yaml_tab_error or test_bad_schemas or test_load_by_yaml_metaschema)' \ --pyargs schema_salad" dh_auto_test endif execute_after_dh_auto_install: find debian -name LICENSE -delete find debian -name '*.cwl' -exec chmod a+x {} \; execute_after_dh_auto_clean: rm -f debian/*.1