#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

export PYTHONPATH=$(CURDIR)

export PYBUILD_NAME=pycoast
export PYBUILD_BEFORE_TEST=cp -r {dir}/pycoast/tests/* {build_dir}/pycoast/tests
export PYBUILD_AFTER_TEST=rm -rf {build_dir}/pycoast/tests
export PYBUILD_TEST_ARGS=$(CURDIR)/pycoast/tests \
-k "not test_add_points_pil and not test_config_file_points_and_borders_pil \
and not test_add_shapefiles_from_dict_agg \
and not test_add_shapefiles_from_dict_pil \
and not test_add_one_shapefile_from_cfg_agg \
and not test_add_one_shapefile_from_cfg_pil \
and not test_add_cities_cfg_pil \
and not test_add_cities_from_dict_pil \
and not test_add_cities_pil \
and not test_add_grid_from_dict_pil \
and not test_eastern_shapes_pil \
and not test_no_h_scratch_pil \
and not test_no_v_scratch_pil \
and not test_western_shapes_pil"

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


override_dh_auto_build:
	dh_auto_build --buildsystem=pybuild
	$(MAKE) -C docs html
	$(RM) -r docs/build/html/_images


override_dh_auto_clean:
	dh_auto_clean --buildsystem=pybuild
	$(MAKE) -C docs clean


override_dh_python3:
	dh_python3 -N python-pycoast-doc
	dh_numpy3 -N python-pycoast-doc
