File: rules

package info (click to toggle)
pyranges 0.0.111%2Bds-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,992 kB
  • sloc: python: 5,546; makefile: 37; sh: 6
file content (36 lines) | stat: -rwxr-xr-x 1,410 bytes parent folder | download
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
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1
include /usr/share/dpkg/buildopts.mk
include /usr/share/dpkg/architecture.mk
export PYBUILD_NAME=pyranges
export PYBUILD_BEFORE_TEST=\
	mkdir -pv {build_dir}/tests {build_dir}/pyranges \
	&& cp -av {dir}/tests/*.bed {build_dir}/tests \
	&& cp -av {dir}/tests/test_data {build_dir}/tests \
	&& cp -av {dir}/tests/data {build_dir}/tests \
	&& cp -av {dir}/pyranges/example_data {build_dir}/pyranges
export PYBUILD_TEST_ARGS=-v -n $(DEB_BUILD_OPTION_PARALLEL)

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
	echo 'Generating corresponding files ...'
	cat debian/missing-sources/test_sorted.sam| samtools view -Sb - > tests/test_data/test_sorted.bam
	cat debian/missing-sources/control.sam| samtools view -Sb - > pyranges/example_data/control.bam
	samtools index tests/test_data/test_sorted.bam tests/test_data/test_sorted.bam.bai
	samtools index pyranges/example_data/control.bam pyranges/example_data/control.bam.bai

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifneq ($(DEB_BUILD_ARCH_BITS),64)
override_dh_auto_test:
	@echo "W: tests skipped on non-64-bit due to #1103074."
endif
endif

execute_after_dh_install:
	find debian/ -name *.bam* | xargs rm -rf
	find debian/ -name 'hi' | xargs rm -rf
	find debian/ -name '.hypothesis' | xargs rm -rf