| 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | |
| 4 | #export DH_VERBOSE = 1 |
| 5 | |
| 6 | SPHINXOPTS := -E -N |
| 7 | |
| 8 | export PYBUILD_NAME=flask |
| 9 | export PYBUILD_BEFORE_TEST=cp CHANGES.rst {build_dir} |
| 10 | export PYBUILD_AFTER_TEST=rm {build_dir}/CHANGES.rst |
| 11 | export PYBUILD_AFTER_INSTALL=rm -rf '{destdir}{install_dir}/flask/sansio/README.md' |
| 12 | export PYBUILD_TEST_ARGS="-k not test_main_module_paths and not test_bad_environ_raises_bad_request" |
| 13 | |
| 14 | %: |
| 15 | dh $@ --buildsystem=pybuild |
| 16 | |
| 17 | override_dh_clean: |
| 18 | dh_clean |
| 19 | rm -rf .mypy_cache |
| 20 | |
| 21 | override_dh_auto_test: |
| 22 | LC_ALL=C.UTF-8 http_proxy='' dh_auto_test |
| 23 | |
| 24 | override_dh_sphinxdoc: |
| 25 | ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) |
| 26 | PYTHONPATH=`dirname $$(find .pybuild/ -type d -name "flask*dist-info" | head -n1)` \ |
| 27 | python3 -m sphinx -b html docs/ $(SPHINXOPTS) debian/python-flask-doc/usr/share/doc/python-flask-doc/html/ |
| 28 | dh_sphinxdoc |
| 29 | # Remove unwanted license file, we already reference d/copyright |
| 30 | rm -f $(CURDIR)/debian/python-flask-doc/usr/share/doc/python-flask-doc/html/_sources/license.rst.txt |
| 31 | rm -f $(CURDIR)/debian/python-flask-doc/usr/share/doc/python-flask-doc/html/license.html |
| 32 | endif |
| 33 | |
| 34 | override_dh_installchangelogs: |
| 35 | dh_installchangelogs CHANGES.rst |