#!/usr/bin/make -f
export PYBUILD_NAME = pexpect

# pxssh wants to bind a low-numbered port
# replwrap has issues when wrapping a readline-enabled command when
# bracketed-paste mode is enabled, which results in extra escape sequences
# pexpect isn't... expecting
# test_beforeacross_chunks seems to contain a race condition as to whether
# the captured output contains a newline or not, which it then asserts
# test_spawn_uses_env appears to rarely fail with no exit code (also a race?)
export PYBUILD_TEST_ARGS = -k 'not (pxssh or replwrap or test_before_across_chunks or test_spawn_uses_env)'

# this skips two further tests upstream knows to be flaky in their CI
export TRAVIS = 1

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

override_dh_auto_clean:
	dh_auto_clean
	rm -rf .coverage

override_dh_auto_build:
	dh_auto_build
	PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/ build/html

override_dh_installdocs:
	dh_installdocs -ppython-pexpect-doc build/html
	dh_installdocs -A
