File: rules

package info (click to toggle)
vcr.py 2.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 908 kB
  • sloc: python: 4,940; makefile: 180; sh: 17
file content (37 lines) | stat: -rwxr-xr-x 1,122 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
#!/usr/bin/make -f
#export DH_VERBOSE=1

export PYBUILD_NAME=vcr

export http_proxy=
export https_proxy=

include /usr/share/dpkg/pkg-info.mk

BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"

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

override_dh_auto_test:
ifeq (~nd,$(findstring ~nd,$(DEB_VERSION)))
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} -m pytest -v -x -rs" dh_auto_test
endif
# don't run tests on Debian because they currently need net connection, cf. #795940
# but run them on Neurodebian by request of the sponsor

override_dh_installdocs:
	pandoc -f rst -t plain -o .pybuild/README README.rst
	dh_installdocs -A .pybuild/README

override_dh_installchangelogs:
	pandoc -f rst -t plain -o .pybuild/changelog docs/changelog.rst
	dh_installchangelogs -A .pybuild/changelog

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx $(SPHINXOPTS) -N -bhtml docs/ \
		debian/python-vcr-doc/usr/share/doc/python-vcr-doc/html/
	dh_sphinxdoc
endif