#!/usr/bin/make -f
#export DH_VERBOSE = 1

PYTHONS:=$(shell pyversions -vr)

include /usr/share/openstack-pkg-tools/pkgos.make

export OSLO_PACKAGE_VERSION=$(VERSION)

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

override_dh_install:
	set -e ; for pyvers in $(PYTHONS); do \
		python$$pyvers setup.py install --install-layout=deb \
			--root $(CURDIR)/debian/python-networking-bgpvpn; \
    done

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	ostestr --black-regex '.bagpipe'
endif

override_dh_sphinxdoc:
	sphinx-build -b html doc/source debian/python-networking-bgpvpn-doc/usr/share/doc/python-networking-bgpvpn-doc/html
	dh_sphinxdoc -O--buildsystem=python_distutil
