File: rules

package info (click to toggle)
flask-migrate 4.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 416 kB
  • sloc: python: 1,197; makefile: 31; sh: 16
file content (34 lines) | stat: -rwxr-xr-x 1,132 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE = 1

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

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

# testsuite wants non-ASCII with python3
export LC_ALL=C.UTF-8
export PYBUILD_NAME=flask-migrate

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_configure:
	dh_auto_configure
	chmod a-x src/flask_migrate/templates/flask/README
	chmod a-x src/flask_migrate/templates/flask/env.py
	chmod a-x src/flask_migrate/templates/flask/script.py.mako
	chmod a-x src/flask_migrate/templates/flask-multidb/README
	chmod a-x src/flask_migrate/templates/flask-multidb/script.py.mako
	chmod a-x src/flask_migrate/templates/flask-multidb/env.py

override_dh_auto_test:
	PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="PYTHONPATH=$(CURDIR)/src {interpreter} -m unittest discover -v" dh_auto_test

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=src python3 -m sphinx -b html $(SPHINXOPTS) docs/ debian/flask-migrate-doc/usr/share/doc/flask-migrate-doc/html
	dh_sphinxdoc
endif