#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

manpage = debian/pipx.1
executable = debian/pipx/usr/bin/pipx

override_dh_auto_test:
	python3 test.py --only-static

# TODO...
# generate manpage based on --help option of script itself
#override_dh_auto_install:
#	dh_auto_install
#	export PYTHONPATH=debian/pipx/usr/lib/python3*/dist-packages/; \
#	  help2man \
#		--name="execute binaries from Python packages in isolated environments" \
#		--no-info --version-option=$(DEB_VERSION_UPSTREAM) \
#		--output=$(manpage) \
#		$(executable) \
#		|| { $(executable) --help; false; }
#	find "$(cdbs_python_destdir)/usr/lib" -name '*.pyc' -delete
#	find "$(cdbs_python_destdir)/usr/lib" -type d -empty -delete
#
#override_dh_clean:
#	dh_clean
#	rm -f $(manpage)

%:
	dh $@ --with python3 --buildsystem=pybuild
