#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
export PYBUILD_TEST_ARGS="--import-mode=importlib"

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	a2x -L --doctype manpage --format manpage $(CURDIR)/debian/gyp.txt > $(CURDIR)/debian/gyp.1
endif

override_dh_auto_clean:
	-dh_auto_clean
	rm -rf build pylib/gyp.egg-info
	rm -f debian/gyp.1
