1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
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
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/
|