File: rules

package info (click to toggle)
flask 3.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,548 kB
  • sloc: python: 10,076; makefile: 32; sql: 22; sh: 19
file content (35 lines) | stat: -rwxr-xr-x 1,124 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
35
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE = 1

SPHINXOPTS := -E -N

export PYBUILD_NAME=flask
export PYBUILD_BEFORE_TEST=cp CHANGES.rst {build_dir}
export PYBUILD_AFTER_TEST=rm {build_dir}/CHANGES.rst
export PYBUILD_AFTER_INSTALL=rm -rf '{destdir}{install_dir}/flask/sansio/README.md'
export PYBUILD_TEST_ARGS="-k not test_main_module_paths"

%:
	dh $@ --buildsystem=pybuild

override_dh_clean:
	dh_clean
	rm -rf .mypy_cache

override_dh_auto_test:
	LC_ALL=C.UTF-8 http_proxy='' dh_auto_test

override_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=`dirname $$(find .pybuild/ -type d -name "flask*dist-info" | head -n1)` \
	    python3 -m sphinx -b html docs/ $(SPHINXOPTS) debian/python-flask-doc/usr/share/doc/python-flask-doc/html/
	dh_sphinxdoc
	# Remove unwanted license file, we already reference d/copyright
	rm -f $(CURDIR)/debian/python-flask-doc/usr/share/doc/python-flask-doc/html/_sources/license.rst.txt
	rm -f $(CURDIR)/debian/python-flask-doc/usr/share/doc/python-flask-doc/html/license.html
endif

override_dh_installchangelogs:
	dh_installchangelogs CHANGES.rst