File: rules

package info (click to toggle)
flask-openid 1.3.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: python: 599; makefile: 120
file content (26 lines) | stat: -rwxr-xr-x 884 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
#!/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)"

export PYBUILD_NAME=flask-openid

%:
	dh $@ --buildsystem=pybuild

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=`dirname $$(find .pybuild/ -type f -name "flask_openid.py" | head -n1)` \
	    python3 -m sphinx -b html $(SPHINXOPTS) docs/ $(CURDIR)/debian/python-flask-openid-doc/usr/share/doc/python-flask-openid-doc/html
	dh_sphinxdoc
endif

override_dh_installexamples:
	dh_installexamples
	# Ugly hack, moving "#!/bin/env python" -> "#!/usr/bin/python3"
	sed -i 's/bin\/env python/usr\/bin\/python3/g' $(CURDIR)/debian/python-flask-openid-doc/usr/share/doc/python-flask-openid-doc/examples/example.py