#!/usr/bin/make -f

export PYBUILD_NAME=rasterio
#test_cli are disabled because they test the tool after installation
export PYBUILD_BEFORE_TEST= cp -r {dir}/tests {build_dir};rm {build_dir}/tests/test_cli.py
export PYBUILD_BEFORE_TEST_python3= cp -r {dir}/tests {build_dir};rm {build_dir}/tests/test_cli.py

export PYBUILD_AFTER_TEST=rm -rf {build_dir}/tests
export PYBUILD_TEST_PYTEST=1


%:
	dh $@ --with python2 --buildsystem pybuild

override_dh_clean:
	dh_clean
	rm -f rasterio/*.c
	rm -f rasterio/*.cpp
	rm -f VERSION.txt
	rm -f gdal-config.txt
	rm -f .coverage 

debian/rio.1:
	help2man rio -N -n "command line interface to rasterio">debian/rio.1

override_dh_install:
	dh_install
	rm -rf debian/python3-rasterio/usr/bin
	rm -rf debian/python-rasterio/usr/bin
