#!/usr/bin/make -f

export DH_VERBOSE = 1

export PYBUILD_NAME=openmotor
export PYBUILD_DISABLE=test

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

override_dh_auto_build:
	export TMPHOME="$(tempfile -d)"; HOME="$TMPHOME" python3 setup.py build_ui; rm -rf $TMPHOME
	touch uilib/views/__init__.py
	dh_auto_build

override_dh_auto_clean:
	dh_auto_clean
	# Remove scripts created during build
	$(RM) uilib/views/*.py

# If you need to rebuild the Sphinx documentation
# Add sphinxdoc to the dh --with line
#
# And uncomment the following lines
#override_dh_auto_build: export http_proxy=127.0.0.1:9
#override_dh_auto_build: export https_proxy=127.0.0.1:9
#override_dh_auto_build:
#	dh_auto_build
#	PYTHONPATH=. python3 -m sphinx -N -bhtml \
#	docs/ build/html # HTML generator
#	PYTHONPATH=. python3 -m sphinx -N -bman \
#	docs/ build/man # Manpage generator
