#!/usr/bin/make -f

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

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

override_dh_auto_test:
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
	# NOTE(jamespage): Disable unit tests due to sqlite related test failures
	#                  with in-memory db's in low memory conditions.
	#                  See https://bugs.launchpad.net/1676712
	# ostestr
	:
endif

override_dh_auto_install:
	pkgos-dh_auto_install --no-py2
	mkdir -p $(CURDIR)/debian/vmware-nsx-common/etc/neutron/plugins/vmware
	PYTHONPATH=$(CURDIR) oslo-config-generator --namespace nsx \
		--output-file $(CURDIR)/debian/vmware-nsx-common/etc/neutron/plugins/vmware/nsx.ini

override_dh_clean:
	dh_clean -O--buildsystem=python_distutils
	rm -rf build

override_dh_install:
	dh_install
	rm -rf $(CURDIR)/debian/python3-vmware-nsx/usr/etc


override_dh_python3:
	dh_python3 --shebang=/usr/bin/python3
