dev-perl/Class-Inspector: amd64 stable
[gentoo.git] / dev-python / automat / automat-0.5.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy)
6
7 inherit distutils-r1
8
9 MYPN="Automat"
10 MYP="${MYPN}-${PV}"
11
12 DESCRIPTION="Self-service finite-state machines for the programmer on the go"
13 HOMEPAGE="https://github.com/glyph/automat https://pypi.python.org/pypi/Automat"
14 SRC_URI="mirror://pypi/${MYPN:0:1}/${MYPN}/${MYP}.tar.gz"
15
16 LICENSE="MIT"
17 SLOT="0"
18 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
19 IUSE="examples test"
20
21 RDEPEND="
22         dev-python/attrs[${PYTHON_USEDEP}]
23         dev-python/six[${PYTHON_USEDEP}]
24 "
25 DEPEND="
26         ${RDEPEND}
27         dev-python/setuptools_scm[${PYTHON_USEDEP}]
28         dev-python/m2r[${PYTHON_USEDEP}]
29         test? ( dev-python/pytest[${PYTHON_USEDEP}] )
30 "
31
32 S=${WORKDIR}/${MYP}
33
34 python_test() {
35         PYTHONPATH="${S}/test:${BUILD_DIR}/lib" py.test -v || die "Tests failed under ${EPYTHON}"
36 }
37
38 src_install() {
39         if use examples; then
40                 docinto examples
41                 dodoc docs/examples/*.py
42         fi
43         distutils-r1_src_install
44 }
45
46 pkg_postinst() {
47         einfo "For additional visualization functionality install these optional dependencies"
48         einfo "    >=dev-python/twisted-16.1.1"
49         einfo "    media-gfx/graphviz[python]"
50 }