File: rules

package info (click to toggle)
tox 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 808 kB
  • ctags: 853
  • sloc: python: 6,558; makefile: 262; sh: 24
file content (45 lines) | stat: -rwxr-xr-x 1,112 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1
#export PYBUILD_VERBOSE=1
export PYBUILD_NAME=tox

PYTHON3=$(shell py3versions -d)

BUILD_DATE=$(\
    shell dpkg-parsechangelog -S Date | LC_ALL=C date -u "+%B %d, %Y" -f -)

%:
	dh $@ --with=python3,sphinxdoc --buildsystem=pybuild

# The tests are not runnable during package build because many invoke the tox
# command line.  It's too much work to make the test suite run partially here
# because upstream always changes the mix.
override_dh_auto_test:

override_dh_install:
	dh_install
	dh_install debian/python3-tox/usr/bin usr
	dh_install debian/python3-tox/usr/lib/$(PYTHON3)/dist-packages \
		   usr/lib/python3

override_dh_installdocs:
	python3 setup.py build_sphinx
	dh_installdocs doc/build/html

override_dh_installman:
	(cd debian/manpage; \
	 sphinx-build \
		-b man -D today="$(BUILD_DATE)" \
		-d _build/doctrees . _build/man)
	dh_installman debian/manpage/_build/man/tox.1

override_dh_installchangelogs:
	dh_installchangelogs CHANGELOG

override_dh_auto_clean:
	dh_auto_clean
	rm -rf build
	rm -rf *.egg-info
	rm -rf .tox
	rm -rf debian/manpage/_build