bb951d314309df8786c46ffd9cc43ffc108b0196
[gentoo.git] / dev-python / cmd2 / cmd2-0.8.9.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python{2_7,3_6,3_7} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Extra features for standard library's cmd module"
10 HOMEPAGE="https://github.com/python-cmd2/cmd2"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm64 x86 ~amd64-linux ~x86-linux"
16 IUSE="test"
17
18 # restrict tests because pyperclip is fairly unstable...
19 RESTRICT="test"
20
21 RDEPEND="
22         >=dev-python/pyparsing-2.0.1[${PYTHON_USEDEP}]
23         dev-python/pyperclip[${PYTHON_USEDEP}]
24         dev-python/six[${PYTHON_USEDEP}]
25         $(python_gen_cond_dep 'dev-python/subprocess32[${PYTHON_USEDEP}]' 'python2*')
26 "
27 DEPEND="${RDEPEND}
28         dev-python/setuptools[${PYTHON_USEDEP}]
29         test? (
30                 dev-python/mock[${PYTHON_USEDEP}]
31                 dev-python/pytest[${PYTHON_USEDEP}]
32         )
33 "
34
35 python_test() {
36         py.test -vv || die
37         ${EPYTHON} example/example.py --test example/exampleSession.txt || die
38 }