File: rules

package info (click to toggle)
python-mechanize 1%3A0.4.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,224 kB
  • sloc: python: 16,718; makefile: 23
file content (25 lines) | stat: -rwxr-xr-x 875 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
#!/usr/bin/make -f

export DH_VERBOSE = 1
export PYBUILD_NAME = mechanize

#export PYBUILD_DISABLE=test

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

override_dh_auto_build: export http_proxy=
override_dh_auto_build: export https_proxy=
override_dh_auto_build: export no_proxy=
override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. python3 -m sphinx -N -bhtml docs/ build/html # HTML generator
	PYTHONPATH=. python3 -m sphinx -N -bman docs/ build/man # Manpage generator

override_dh_auto_test-indep:
	# several points here:
	# - pybuild sets proxy server which breaks locally started server, disable it
	# - we need to explicitly change to the build dir, otherwise the test
	#   uses the main files
	# Thanks to Dmitry Shachnev for finding all that!
	http_proxy= no_proxy= dh_auto_test -- --system custom --test-args "cd {build_dir}; {interpreter} run_tests.py"