File: rules

package info (click to toggle)
python-amqp 5.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 800 kB
  • sloc: python: 6,041; makefile: 208
file content (28 lines) | stat: -rwxr-xr-x 776 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

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

BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")

export PYBUILD_NAME=amqp
export PYBUILD_BEFORE_TEST=cp -r {dir}/t {build_dir} ; rm -rf {build_dir}/t/integration
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/t

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

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=. python3 -m sphinx -D today="$(BUILD_DATE)" -b html -N docs/ $(CURDIR)/debian/python-amqp-doc/usr/share/doc/python-amqp-doc/html
	dh_sphinxdoc
endif

override_dh_clean:
	rm -rf docs/.build
	dh_clean

override_dh_installchangelogs:
	dh_installchangelogs docs/changelog.rst