File: rules

package info (click to toggle)
flask-paginate 2024.4.12-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 416 kB
  • sloc: python: 961; makefile: 143
file content (31 lines) | stat: -rwxr-xr-x 918 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
#!/usr/bin/make -f

#export DH_VERBOSE = 1
export HOME=$(CURDIR)
export PYBUILD_TEST_ARGS={dir}/tests/tests.py
export PYBUILD_NAME=flask-paginate
export DOC_PKG := python-flask-paginate-doc
export DOC_PKG_PATH := $(CURDIR)/debian/$(DOC_PKG)

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

 # Build sphinx HTML documentation
 override_dh_sphinxdoc:
 ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=flask_paginate python3 -m sphinx -b html -d debian/doctrees \
		-N docs/ $(DOC_PKG_PATH)/usr/share/doc/$(DOC_PKG)/html
 endif

override_dh_link:
	dh_link
# Fix duplicate-files
	jdupes -rl debian/python-flask-paginate-doc/usr/share/doc/
	rm -rf debian/doctree

# Fix privacy-breach-generic
	find debian/python-flask-paginate-doc/ -name '*.html' \
		-exec sed -i 's|http://s3.amazonaws||g' {} \;

# Fix embedded-javascript-library
	find debian/python-flask-paginate-doc/usr/share/doc -name '*.js' -delete