File: rules

package info (click to toggle)
sphinxcontrib-openapi 0.8.4-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 880 kB
  • sloc: python: 7,575; makefile: 23
file content (35 lines) | stat: -rwxr-xr-x 1,115 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

export PYBUILD_NAME = sphinxcontrib.openapi
export PYBUILD_TEST_PYTEST = 1

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

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	export PYTHONPATH=$$(pybuild --print build_dir | grep "^$$(py3versions -d)" | sed -e 's/^.*: //'); \
	    sphinx-build -W -b html docs docs/_build/html
endif

ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
execute_before_dh_auto_configure:
	# tests/OpenAPI-Specification may already exist
	mkdir -p tests/OpenAPI-Specification
	cp -r /usr/share/doc/openapi-specification/examples tests/OpenAPI-Specification
endif

override_dh_installdocs:
	dh_installdocs -ppython-sphinxcontrib.openapi-doc --doc-main-package=python3-sphinxcontrib.openapi
	dh_installdocs --remaining-packages

execute_after_dh_auto_clean:
	rm -rf docs/_build
	rm -rf tests/OpenAPI-Specification/*

before-pybuild-autopkgtest:
	# tests/OpenAPI-Specification may already exist
	mkdir -p tests/OpenAPI-Specification
	cp -r /usr/share/doc/openapi-specification/examples tests/OpenAPI-Specification