File: rules

package info (click to toggle)
pychopper 2.7.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 110,288 kB
  • sloc: python: 1,200; makefile: 233; sh: 45
file content (43 lines) | stat: -rwxr-xr-x 1,254 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
37
38
39
40
41
42
43
#!/usr/bin/make -f
export DH_VERBOSE = 1

export PYBUILD_NAME=pychopper
export PYBUILD_BEFORE_TEST=cp -av $(CURDIR)/pychopper/tests/ {build_dir}/pychopper/
DEF_PY=$(shell py3versions -d)
DEF_BUILDDIR3 := $(shell pybuild --print build_dir --interpreter python3)

%:
	dh $@ --buildsystem=pybuild


override_dh_auto_build:
	dh_auto_build
	cd docs && PYTHONPATH=.. make man

execute_after_dh_auto_build:
	for py in `py3versions -s`; do \
		builddir=$$(pybuild --print build_dir --interpreter $$py); \
		mv $$builddir/pychopper/scripts/pychopper.py $$builddir/pychopper/scripts/pychopper; \
	done

override_dh_auto_clean:
	dh_auto_clean
	make clean
	cd docs && make clean # fails

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test -- --system=custom --test-args="export PATH=$(DEF_BUILDDIR3)/pychopper/scripts:$$PATH; \
	chmod +x $(DEF_BUILDDIR3)/pychopper/scripts/pychopper; PYTHONPATH={build_dir} {interpreter} -m pytest -v"
	set -e; \
	for py in `py3versions -sv`; do \
	rm -rf ".pybuild/cpython3_$${py}_$(PYBUILD_NAME)/pychopper/tests/"; \
	done
endif

execute_after_dh_auto_install:
	find debian/ -name .gitignore -delete

override_dh_fixperms:
	dh_fixperms
	find debian/ -name PCS111_primers.fas -exec chmod -x '{}' \;