File: rules

package info (click to toggle)
pytools 2021.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 564 kB
  • sloc: python: 4,726; makefile: 36; sh: 2
file content (35 lines) | stat: -rwxr-xr-x 874 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

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
export DH_VERBOSE = 1
export PYBUILD_VERBOSE=1
else
export DH_QUIET = 1
endif

export PYBUILD_DESTDIR_python2=debian/python-pytools/
export PYBUILD_DESTDIR_python3=debian/python3-pytools/

BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "@$(SOURCE_DATE_EPOCH)")
SPHINXOPTS:=-D today=\"$(BUILD_DATE)\"
SPHINXOPTS+=-D html_last_updated_fmt=\"$(BUILD_DATE)\"

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

override_dh_auto_build:
	find pytools/ -name decorator.py -delete
	find pytools/ -name log.py -delete
	dh_auto_build

override_dh_installdocs:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	$(MAKE) -C doc html SPHINXOPTS="$(SPHINXOPTS)"
	dh_installdocs
endif

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test --buildsystem pybuild -- --test-pytest
endif