Commit 401dbee4 authored by Jonas Smedegaard's avatar Jonas Smedegaard

Fix run package testsuite and generate shell completion scripts and manpage...

Fix run package testsuite and generate shell completion scripts and manpage during install (not during build: pybuild resolves executable only during install.
parent 2a168e8a
......@@ -4,9 +4,6 @@ include /usr/share/dpkg/pkg-info.mk
cmd = ontospy
_ENV = $(strip \
PATH="$(CURDIR)/build/scripts-$(shell py3versions -dv):$(PATH)" \
PYTHONPATH="$(CURDIR)/.pybuild/cpython3_$(shell py3versions -dv)/build")
_ENV_staged = $(strip \
PATH="$(CURDIR)/debian/tmp/usr/bin:$(PATH)" \
PYTHONPATH="$(CURDIR)/debian/tmp/usr/lib/$(shell py3versions -d)/dist-packages")
......@@ -19,22 +16,22 @@ _mkman = $(_ENV) \
# * try but distrust upstream testsuite
override_dh_auto_test:
dh_auto_test --buildsystem=pybuild || true
$(_ENV) prove debian/tests/*.t
# generate shell completion scripts
override_dh_auto_build:
dh_auto_build --buildsystem=pybuild
# * generate manpage based on --help option of script itself
# * generate shell completion scripts
# TODO: run package testsuite during build
# TODO: generate files during build
override_dh_auto_install:
dh_auto_install --buildsystem=pybuild
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
$(_ENV) prove debian/tests/*.t
endif
$(_ENV) _ONTOSPY_COMPLETE=source $(cmd) \
> debian/bash-completion || true
test -s debian/bash-completion
$(_ENV) _ONTOSPY_COMPLETE=source_zsh $(cmd) \
> debian/_$(cmd) || true
test -s debian/_$(cmd)
# generate manpage based on --help option of script itself
override_dh_auto_install: _ENV = $(_ENV_staged)
override_dh_auto_install:
dh_auto_install --buildsystem=pybuild
$(call _mkman, $(cmd), debian/$(cmd).1, \
command-line tool to inspect and visualize RDF models)
find debian/tmp/usr/lib -name '*.pyc' -delete
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment