#!/usr/bin/make -f

export PYBUILD_NAME = ncclient

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

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	nosetests3 test --verbosity=3 ncclient
endif

# Split package and documentation
override_dh_sphinxdoc:
	python3 -m sphinx -b html docs/source/ $(CURDIR)/debian/python-ncclient-doc/usr/share/doc/python-ncclient/html
	dh_sphinxdoc -O--buildsystem=python_distutils

override_dh_auto_clean:
	dh_auto_clean
	rm -fr docs/build
