Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export PYBUILD_NAME=MACS3
4 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
5
6 #export DEB_CFLAGS_MAINT_APPEND+=-DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
7 #export DEB_CXXFLAGS_MAINT_APPEND+=-DSIMDE_ENABLE_OPENMP -fopenmp-simd -O3
8 # not necessary, upstream does this already in setup.py
9
10 include /usr/share/dpkg/default.mk
11
12 subcommands=callpeak bdgpeakcall bdgbroadcall bdgcmp bdgopt cmbreps bdgdiff \
13 filterdup predictd pileup randsample refinepeak
14 tagline=\- Model\-based Analysis for ChIP\-Sequencing
15 # DH_VERBOSE := 1
16
17 %:
18 dh $@ --buildsystem=pybuild
19
20 execute_before_dh_python3:
21 dh_numpy3
22
23 override_dh_auto_build:
24 for pyx in $$(find MACS3/ -name "*.pyx"); do \
25 rm -f $${pyx%%.pyx}.{h,c}; touch $${pyx}; done
26 dh_auto_build
27 PYTHONPATH=./.pybuild/cpython3_$$(py3versions -v -d)_MACS3/build/ help2man \
28 --no-discard-stderr --no-info \
29 --name "macs3 ${tagline}" "python3 bin/macs3" > debian/macs3.1
30 for subcommand in ${subcommands}; do printf \
31 "[NAME]\nmac3_$${subcommand} ${tagline}\n" \
32 > debian/macs3_$${subcommand}-man-include; done
33 for subcommand in ${subcommands}; do \
34 PYTHONPATH=./.pybuild/cpython3_$$(py3versions -v -d)_MACS3/build/ help2man \
35 --no-discard-stderr --no-info --version-string="$(DEB_VERSION_UPSTREAM)" \
36 --include debian/macs3_$${subcommand}-man-include \
37 "python3 bin/macs3 $${subcommand}" > \
38 debian/macs3_$${subcommand}.1; done
39
40 override_dh_auto_test:
41 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
42 dh_auto_test
43 ifeq (,$(filter $(DEB_HOST_ARCH),arm64 ppc64el s390x))
44 cd test && for PY3VER in $(shell py3versions -vs); do \
45 export PATH=$(CURDIR)/.pybuild/cpython3_$${PY3VER}_MACS3/scripts:$$PATH \
46 && export PYTHONPATH=$(CURDIR)/.pybuild/cpython3_$${PY3VER}_MACS3/build \
47 && ./cmdlinetest macs$(DEB_VERSION)-$${PY3VER} ; done
48 endif
49 endif