#!/usr/bin/make -f

export PYBUILD_NAME=goodwe

%:
	dh $@ --buildsystem=pybuild

override_dh_auto_build:
	head -n 1 debian/changelog | python3 -c "import sys; import re; print(re.search(r'\((.*)-[^)]+\)', sys.stdin.read()).group(1))" > VERSION
	dh_auto_build

override_dh_auto_clean:
	dh_auto_clean
	rm -rf goodwe.egg-info/ VERSION
