#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

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

execute_before_dh_auto_configure:
	# Ensure we have the correct version in the Python metadata
	echo $(DEB_VERSION_UPSTREAM) | sed "s/+salsa.*//" >VERSION

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	flake8
	RUN_FROM_SOURCE_TREE=1 python3 -m unittest
endif
