Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 export DH_ALWAYS_EXCLUDE=__pycache__
4 export PYBUILD_TEST_PYTEST=1
5
6 # Some things have to be done for a smooth run of tests using pytest:
7 # - pytest has to find tests in the source tree.
8 # - resources expected for tests have to be copied to build dir.
9 # - egg-info has to be available so pkg_resources can find the module.
10 export PYBUILD_TEST_ARGS={build_dir}/tests
11 export PYBUILD_BEFORE_TEST=cp -r {dir}/docs {dir}/README.rst {build_dir}
12 export PYBUILD_AFTER_TEST=cd {build_dir}; rm -rf docs README.rst *.egg-info
13
14 %:
15 dh $@ --with python3,sphinxdoc --buildsystem=pybuild
16
17 override_dh_auto_clean:
18 dh_auto_clean
19 rm -rf .eggs
20
21 override_dh_installchangelogs:
22 dh_installchangelogs CHANGES.rst
23
24 override_dh_auto_install:
25 dh_auto_install
26 cd docs ; env PYTHONPATH=$(CURDIR) LC_ALL=C.UTF-8 LANGUAGE=C.UTF-8 make html
27
28 override_dh_auto_test:
29 env PYTHONPATH=$(CURDIR) dh_auto_test