#! /usr/bin/make -f

export PYBUILD_NAME=ruamel.yaml
export PYBUILD_INSTALL_ARGS=--single-version-externally-managed
export PYBUILD_AFTER_INSTALL_python2=rm -rf {destdir}/usr/bin/
export PYBUILD_BEFORE_BUILD_python2=cython ext/_ruamel_yaml.pyx
export PYBUILD_BEFORE_BUILD_python3=cython3 ext/_ruamel_yaml.pyx

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

# Unfortunately, the tarball is incomplete and we cannot run
# tests. See:
#  https://bitbucket.org/ruamel/yaml/issues/17/test-roundtrippy-absent-from-release
override_dh_auto_test:

override_dh_auto_install:
	dh_auto_install
	rm debian/python*-ruamel.yaml/usr/lib/python*/dist-packages/ruamel/yaml/make_win_whl.py
