1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 pypy3 )
7 PYTHON_REQ_USE="threads(+)"
11 DESCRIPTION="Python module for spawning child apps and responding to expected patterns"
12 HOMEPAGE="https://pexpect.readthedocs.io/ https://pypi.org/project/pexpect/ https://github.com/pexpect/pexpect/"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
17 KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
18 IUSE="doc examples test"
19 RESTRICT="!test? ( test )"
21 RDEPEND=">=dev-python/ptyprocess-0.5[${PYTHON_USEDEP}]"
23 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
24 test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
26 python_compile_all() {
27 use doc && emake -C doc html
31 py.test tests || die "Tests fail with ${EPYTHON}"
34 python_install_all() {
35 use doc && local HTML_DOCS=( doc/_build/html/. )
38 docompress -x /usr/share/doc/${PF}/examples
40 distutils-r1_python_install_all