File: rules

package info (click to toggle)
python-openapi-spec-validator 0.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 772 kB
  • sloc: python: 2,050; makefile: 54
file content (32 lines) | stat: -rwxr-xr-x 1,075 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export PYBUILD_NAME=openapi-spec-validator
export PYBUILD_AFTER_INSTALL = rm -rf {destdir}/{install_dir}/.coverage {destdir}/{install_dir}/reports
export PYBUILD_TEST_ARGS = -m 'not network'

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

ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build:
	PYTHONPATH=$$(pwd) sphinx-build -W -b html docs docs/_build/html
endif

override_dh_installdocs:
	dh_installdocs -ppython-$(PYBUILD_NAME)-doc --doc-main-package=python3-$(PYBUILD_NAME)
	dh_installdocs --remaining-packages
	cp NOTICE debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc

execute_after_dh_auto_install:
	PYTHONPATH=. help2man debian/python3-$(PYBUILD_NAME)/usr/bin/$(PYBUILD_NAME) \
	  --no-info \
	  --section 1 \
          --version-string '$(DEB_VERSION_UPSTREAM)' \
	  --name "$(shell grep '^Description' debian/control | head -n 1 | cut -d: -f2)" \
	  > $(PYBUILD_NAME).1

execute_after_dh_auto_clean:
	rm -rf docs/_build
	rm -f openapi-spec-validator.1