File: rules

package info (click to toggle)
python-respx 0.22.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 868 kB
  • sloc: python: 4,379; makefile: 17
file content (27 lines) | stat: -rwxr-xr-x 1,099 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
#!/usr/bin/make -f

export PYBUILD_NAME=respx
export PYBUILD_TEST_ARGS = --asyncio-mode=auto --cov-fail-under 95 -k 'not test_pass_through[httpcore-route0-True] and not test_pass_through[httpcore-route2-False] and not test_pass_through[httpcore-route3-True]$(if $(PYBUILD_AUTOPKGTEST),, and not test_respx_mock_fixture)'

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_install:
	# Exclude coverage from installing
	rm -f debian/python3-respx/usr/lib/python3*/dist-packages/coverage.xml
	rm -f debian/python3-respx/usr/lib/python3*/dist-packages/.coverage

override_dh_installdocs:
	PYTHONPATH=. https_proxy='127.0.0.1:9' http_proxy='127.0.0.1:9' mkdocs build -d build/html

	# Remove or replace privacy-breach URLs with local paths
	find -type f -name "*.html" -exec sed -i 's|https://fonts.gstatic.com|(URL removed)|g' {} +
	find -type f -name "*.html" -exec sed -i 's|https://fonts.googleapis.com/css|(URL removed)|g' {} +

	dh_installdocs -ppython-respx-doc --doc-main-package=python-respx-doc build/html
	dh_installdocs

override_dh_clean:
	dh_clean
	rm -f coverage.xml
	rm -f .coverage