File: rules

package info (click to toggle)
python-openapi-core 0.22.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,104 kB
  • sloc: python: 19,979; makefile: 44
file content (25 lines) | stat: -rwxr-xr-x 873 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 PYBUILD_NAME=openapi-core
export PYBUILD_AFTER_INSTALL = rm -rf {destdir}/{install_dir}/.coverage {destdir}/{install_dir}/reports
# Despite an attempted fix, starlette still sometimes gives warnings:
# ResourceWarning: Unclosed <MemoryObjectReceiveStream at ...>
# See https://github.com/encode/starlette/discussions/2603
# We therefore ignore them.
export PYBUILD_TEST_ARGS=-W ignore::ResourceWarning

%:
	dh $@ --buildsystem=pybuild

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	mkdir -p docs_build
	PYTHONPATH=$$(pwd) python3 -m mkdocs build --clean --site-dir docs_build/html --config-file mkdocs.yml
endif

override_dh_installdocs:
	dh_installdocs -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
	dh_installdocs --remaining-packages

execute_after_dh_auto_clean:
	rm -rf docs_build