#! /usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk
export SETUPTOOLS_SCM_PRETEND_VERSION=$(DEB_VERSION_UPSTREAM:+ds=)
export PYBUILD_NAME=metpy
export PYBUILD_BEFORE_TEST=\
ln -s {dir}/conftest.py {dir}/tests 2>/dev/null || true; \
ln -s {dir}/src/${PYBUILD_NAME}/*.txt {build_dir}/${PYBUILD_NAME} 2>/dev/null || true; \
ln -s {dir}/src/${PYBUILD_NAME}/plots/_static {build_dir}/${PYBUILD_NAME}/plots 2>/dev/null || true; \
ln -s {dir}/src/${PYBUILD_NAME}/plots/colortable_files {build_dir}/${PYBUILD_NAME}/plots 2>/dev/null || true; \
ln -s {dir}/src/${PYBUILD_NAME}/plots/nexrad_tables {build_dir}/${PYBUILD_NAME}/plots 2>/dev/null || true
export PYBUILD_AFTER_TEST=rm -f {dir}/tests/conftest.py
export PYBUILD_TEST_ARGS=-m "not network"

%:
	dh $@ --buildsystem=pybuild
