#!/usr/bin/make -f

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

# For some reason, the tests are installed with the package.  The easiest
# way I've found to remove them from the final package is to move them
# out of the way.
execute_before_dh_auto_configure:
	if [ -d tests ]; then \
	  if [ -d three_merge/tests ]; then \
	    echo "Inconsistent state: both tests and three_merge/tests exist"; \
	    false; \
	  fi; \
	else \
	  mv three_merge/tests tests; \
	fi

execute_after_dh_auto_clean:
	if [ -d tests ]; then \
	  if [ -d three_merge/tests ]; then \
	    echo "Inconsistent state: both tests and three_merge/tests exist"; \
	    false; \
	  else \
	    mv tests three_merge; \
	  fi; \
	fi
