#!/usr/bin/make -f

%:
	dh $@ --buildsystem=pybuild

execute_after_dh_auto_build:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	PYTHONPATH=src python3 -m sphinx \
		-d build/docs/doctree \
		-b html \
		docs \
		build/docs/html
	COLUMNS=80 PYTHONPATH=src \
	  python3 scripts/generate_man.py
	PYTHONPATH=src register-python-argcomplete --shell fish pipx > pipx.fish
endif

override_dh_auto_test:
	echo "Skipped: The test suite downloads and executes code from the Internet"

dh_compress:
	dh_compress -X.html
