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

export PYBUILD_DISABLE_python2=1
export PYBUILD_INSTALL_DIR=usr/share/ubuntu-wsl-oobe/
export PYBUILD_INSTALL_ARGS_python3=--install-lib=usr/share/ubuntu-wsl-oobe/ \
       --install-data=usr/ \
       --no-compile -O0
export PYBUILD_DESTDIR=debian/tmp/
export PYBUILD_OPTION="-v"

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

subiquity-submodule:
	@if [ ! -e subiquitycore ]; then \
	  echo "############# ERROR #############"; \
	  echo subiquity needs to be checked out; \
	  echo Please run:; \
	  echo $$ git submodule init ; \
	  echo $$ git submodule update ; \
	  echo "#################################"; \
	  exit 1; \
	fi

override_dh_auto_clean: subiquity-submodule
	rm -f .subiquity/subiquity-debug.log installer/geninstaller.log
	rm -rf probert/
	dh_auto_clean

override_dh_python3:
	dh_python3 --ignore-shebangs usr/share/ubuntu-wsl-oobe/

override_dh_auto_test:
	@echo "Skipping subiquity tests"
