File: rules

package info (click to toggle)
dh-virtualenv 1.2.2-1.1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 364 kB
  • sloc: python: 1,190; perl: 157; makefile: 146; sh: 22
file content (30 lines) | stat: -rwxr-xr-x 695 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
#!/usr/bin/make -f

DH_ARGS ?=
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	DH_ARGS += --with sphinxdoc
endif

PYTHON_VERSION := $(shell python3 -c 'import sys; print("%s.%s" % sys.version_info[:2])')

%:
	dh $@ --buildsystem=pybuild --with python3 $(DH_ARGS)

override_dh_auto_clean:
	rm -rf doc/_build
	rm -f doc/dh_virtualenv.1
	rm -rf dh_virtualenv.egg-info
	dh_auto_clean

override_dh_auto_build:
	rst2man doc/dh_virtualenv.1.rst >doc/dh_virtualenv.1
	dh_auto_build

override_dh_gencontrol:
	dh_gencontrol -- -Vpyversion=$(PYTHON_VERSION)

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
override_dh_installdocs:
	python3 setup.py build_sphinx
	dh_installdocs doc/_build/html
endif