| 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | |
| 4 | include /usr/share/dpkg/pkg-info.mk |
| 5 | |
| 6 | export PYBUILD_NAME=pytest |
| 7 | |
| 8 | # 2015-12-16 [email protected]: Because pytest does not clean up after itself, |
| 9 | # use a custom temporary directory (which is easier to clean up manually, |
| 10 | # e.g. in an sbuild). |
| 11 | export PYBUILD_BEFORE_TEST=mkdir -p {dir}/debian/tmp/test-working-directory |
| 12 | export PYBUILD_AFTER_TEST=rm -rf {dir}/debian/tmp/test-working-directory |
| 13 | export PYBUILD_TEST_CUSTOM=1 |
| 14 | export PYBUILD_TEST_ARGS=cd {dir}/debian/tmp/test-working-directory && \ |
| 15 | {interpreter} -m pytest --lsof -rfsxX \ |
| 16 | --ignore={dir}/testing/test_entry_points.py \ |
| 17 | --ignore={dir}/testing/test_terminal.py \ |
| 18 | -k 'not test_code_highlight' \ |
| 19 | {dir}/testing |
| 20 | |
| 21 | %: |
| 22 | dh $@ --buildsystem=pybuild |
| 23 | |
| 24 | execute_after_dh_auto_build: |
| 25 | ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 26 | PYTHONPATH=$(shell pybuild --print {build_dir} --interpreter python3) \ |
| 27 | SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build \ |
| 28 | $(MAKE) -C doc/en man html |
| 29 | endif |
| 30 | |
| 31 | override_dh_gencontrol: |
| 32 | dh_gencontrol -ppython3-pytest-subtests -- -v0.15.0++$(DEB_VERSION_UPSTREAM_REVISION) |
| 33 | dh_gencontrol --remaining-packages |