#!/usr/bin/make -f

%:
	dh $@ --buildsystem=python_distutils --with python2,sphinxdoc

PYTHONS:=$(shell pyversions -vr)
override_dh_auto_install:
	set -e && for pyvers in $(PYTHONS); do \
                python$$pyvers setup.py install --install-layout=deb \
                        --root $(CURDIR)/debian/python-ncclient ; \
        done

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

override_dh_sphinxdoc:
	sphinx-build -b html docs/source/ $(CURDIR)/debian/python-ncclient/usr/share/doc/python-ncclient/html
	dh_sphinxdoc -O--buildsystem=python_distutils

override_dh_auto_clean:
	dh_auto_clean
	rm -fr docs/build
