#!/usr/bin/make -f include /usr/share/dpkg/default.mk export PYBUILD_NAME=pysam export LC_ALL = C.UTF-8 export DEB_BUILD_MAINT_OPTIONS = hardening=+all export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed TESTPKG := $(DEB_SOURCE)-tests export HTSLIB_MODE=external HTSLIBDIR := /usr/lib/$(DEB_HOST_MULTIARCH) export HTSLIB_LIBRARY_DIR=$(HTSLIBDIR) export HTSLIB_INCLUDE_DIR=/usr/include # unfortunately this does not work - any hint to fix this would be really welcome #export PYBUILD_TEST_ARGS_python3=-k-XTestRemoteFileHTTP -k-XTestRemoteFileHTTPWithHeader clean: clean-tests %: dh $@ --with python3 --buildsystem=pybuild override_dh_install: clean-tests dh_install -Xtest.gtf.gz find debian -name log.txt -delete ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) override_dh_auto_test: pysam_data.all cbcf_data.all export PYBUILD_TEST_ARGS='|| true' ; dh_auto_test else override_dh_auto_test: endif override_dh_auto_clean: dh_auto_clean $(RM) \ pysam/config.py \ pysam/config.h \ pysam/lib*.c \ samtools/config.h \ bcftools/config.h rm -rf pysam.egg-info .PHONY: pysam_data.% cbcf_data.% cbcf_data.%: cd tests/$(basename $@) && $(MAKE) $* pysam_data.%: cd tests/$(basename $@) && $(MAKE) $* .PHONY: clean-tests clean-tests: pysam_data.clean cbcf_data.clean find . -name "*.pyc" -delete find . -name "*.pyxbldc" -delete find . -name "tmp_*.bam" -delete find . -name "*.bai*" -delete find . -name "*.cram*" -delete find . -name "pysam_uncompressed.bam" -delete rm -rf tests/pysam_test_work \ tests/example_htslib.gtf.gz.tbi \ tests/log.txt \ tests/test.bam \ tests/_compile_test.c \ tests/pysam_ex2.sam \ tests/__pycache__ \ pysam/calignmentfile.c \ pysam/cbcf.c \ tests/GRCh38_full_analysis_set_plus_decoy_hla.fa.fai \ tests/pysam_data/ex1.fa.gz \ tests/pysam_data/ex1.fa.gz.gzi \ tests/pysam_data/ex1_csi.bam.csi rm -rf .pytest_cache/