#! /usr/bin/make -f

export PYBUILD_NAME=smart-open
export PYBUILD_BEFORE_TEST := cp -a smart_open/tests {build_dir}/smart_open
export PYBUILD_TEST_ARGS=smart_open/tests -k 'not test_gs_uri and not test_scheme'

export http_proxy=127.0.0.1:9
export https_proxy=127.0.0.1:9
export HTTP_PROXY=127.0.0.1:9
export HTTPS_PROXY=127.0.0.1:9

export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1

%:
	dh $@ --buildsystem=pybuild

# FIXME: Remove this once gcs is packaged
execute_before_dh_auto_configure:
	rm -f smart_open/gcs.py
	rm -f smart_open/tests/test_gcs.py

execute_after_dh_auto_install:
	find debian/ -name LICENSE -delete
