#!/usr/bin/make -f

export PYBUILD_NAME := cached-property

# Disable the tests on python2, they contain partly python3 specific syntax.
export PYBUILD_DISABLE_python2.7=test

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

override_dh_auto_clean:
	rm -rf $(PACKAGE_NAME).egg-info
	rm -rf PKG-INFO
	dh_auto_clean

override_dh_install:
	dh_install
	# Copy the test suite to a decent location
	# But don't copy them for the Python2 package, the package installation
	# will fail when trying to compile the test files
	#mkdir -p debian/python-cached-property/usr/share/python-cached-property
	#cp -r tests/ debian/python-cached-property/usr/share/python-cached-property
	mkdir -p debian/python3-cached-property/usr/share/python3-cached-property
	cp -r tests/ debian/python3-cached-property/usr/share/python3-cached-property
