#!/usr/bin/make -f

export PYBUILD_NAME=libcloud

export PYBUILD_BEFORE_TEST=ln -s {dir}/libcloud/test/secrets.py-dist {build_dir}/libcloud/test/secrets.py
export PYBUILD_AFTER_TEST=rm -f {build_dir}/libcloud/test/secrets.py

# Disable tests requiring network access.
export PYBUILD_TEST_ARGS='-k not test_constructor \
			     and not test_connection_to_unusual_port \
			     and not test_connection_timeout_raised \
			     and not test_prepared_request_empty_body_chunked_encoding_not_used \
			     and not test_prepared_request_with_body \
			     and not test_request_custom_timeout_no_timeout \
			     and not test_request_custom_timeout_timeout \
			     and not test_list_nodes_invalid_region'

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

execute_after_dh_auto_install:
	rm -rf $(CURDIR)/debian/python3-libcloud/usr/lib/python3.*/dist-packages/libcloud/test
