File: rules

package info (click to toggle)
python-csb 1.2.5%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,804 kB
  • sloc: python: 24,193; xml: 812; sh: 67; makefile: 26
file content (36 lines) | stat: -rwxr-xr-x 1,145 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

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PYVERS = $(shell pyversions -r)
PY3VERS = $(shell py3versions -r)
BUILDHOME = $(CURDIR)/debian/buildhome
export PYBUILD_NAME=csb

%:
	dh $@ --with python2,python3 --buildsystem=pybuild
	
override_dh_auto_build:
	dh_auto_build
	mkdir -p $(CURDIR)/docs/api
	mkdir -p $(BUILDHOME)
	HOME=$(BUILDHOME) epydoc --html -o $(CURDIR)/docs/api --name CSB --no-private --introspect-only --exclude csb.test.cases --fail-on-error --fail-on-warning --fail-on-docstring-warning $(CURDIR)/csb

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILDHOME)
	find . -name "*.pyc" -delete
	rm -rf docs

override_dh_auto_test:
	LC_ALL=C.UTF-8 dh_auto_test -- --test --system=custom \
		--test-args='set -e; \
                             cd {build_dir}; \
                             PYTHONPATH={build_dir} PYTHONWARNINGS=d {interpreter} csb/test/app.py --generated-resources /tmp --verbosity 2'

override_dh_install:
	dh_install
	mkdir -p debian/$(PYBUILD_NAME)/usr
	mv debian/python3-$(PYBUILD_NAME)/usr/bin debian/$(PYBUILD_NAME)/usr
	rm -rf debian/python-$(PYBUILD_NAME)/usr/bin