| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
# export DH_VERBOSE = 1 |
| 4 |
export PYBUILD_NAME = debsbom |
| 5 |
export PYBUILD_TEST_PYTEST = 1 |
| 6 |
export PYBUILD_DESTDIR=debian/debsbom/ |
| 7 |
|
| 8 |
# pybuild by default exports the http_proxy, https_proxy and no_proxy env vars |
| 9 |
# in order to try to prevent builds from accessing the internet. (See `man 1 pybuild`) |
| 10 |
# |
| 11 |
# Passing the argument below to the PYBUILD_TEST_ARGS env var deselects all of |
| 12 |
# the tests marked as 'online' in order to prevent them from failing. |
| 13 |
# For more information, see: https://docs.pytest.org/en/7.1.x/example/markers.html |
| 14 |
export PYBUILD_TEST_ARGS='-k not online' |
| 15 |
|
| 16 |
export SPHINXBUILD=/usr/share/sphinx/scripts/python3/sphinx-build |
| 17 |
|
| 18 |
%: |
| 19 |
dh $@ --buildsystem=pybuild --with sphinxdoc --with bash-completion |
| 20 |
|
| 21 |
|
| 22 |
execute_after_dh_auto_build: |
| 23 |
PYTHONPATH="$(CURDIR)" \ |
| 24 |
http_proxy="127.0.0.1:9" \ |
| 25 |
https_proxy="127.0.0.1:9" \ |
| 26 |
make -C docs/ html SPHINXBUILD="$(SPHINXBUILD)" && \ |
| 27 |
make -C docs/ man SPHINXBUILD="$(SPHINXBUILD)" |
| 28 |
|
| 29 |
override_dh_bash-completion: |
| 30 |
PYTHONPATH=src shtab --shell=bash debsbom.cli.setup_parser --error-unimportable --prog debsbom \ |
| 31 |
> debian/debsbom.bash-completion |
| 32 |
dh_bash-completion |