File: rules

package info (click to toggle)
betamax 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 656 kB
  • sloc: python: 2,644; makefile: 125
file content (30 lines) | stat: -rwxr-xr-x 1,160 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
#! /usr/bin/make -f

export PYBUILD_NAME=betamax

# test_fixtures.py needs package already installed, test_add_urllib3_response
# is broken due unbundling in Debian
# (see https://github.com/kennethreitz/requests/issues/2870) and remaining
# tests need Internet connection.
export PYBUILD_TEST_ARGS = --ignore tests/integration/test_fixtures.py \
	--ignore tests/integration/test_hooks.py \
	--ignore tests/integration/test_placeholders.py \
	--ignore tests/integration/test_record_modes.py \
	--ignore tests/integration/test_unicode.py \
	--ignore tests/regression/test_gzip_compression.py \
	--ignore tests/regression/test_requests_2_11_body_matcher.py \
	-k 'not test_add_urllib3_response'

LAST_CHANGE = $(shell dpkg-parsechangelog -S Date)
BUILD_DATE  = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"

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

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