14e74c719dce85f3d3c18186a205e786180db3dc
[wtk-overlay.git] / tornado-pyvows-9999.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit distutils-r1
9
10 MY_PN="tornado_pyvows"
11 MY_P="${MY_PN}-${PV}"
12
13 if [[ "${PV}" == "9999" ]]; then
14         inherit git-2
15         EGIT_REPO_URI="git://github.com/rafaelcaricio/${MY_PN}.git"
16         SRC_URI=""
17 else
18         SRC_URI="mirror://pypi/${MY_P:0:1}/${MY_PN}/${MY_P}.tar.gz -> ${P}.tar.gz"
19 fi
20
21 DESCRIPTION="Extensions to test Tornado apps under pyvows"
22 HOMEPAGE="https://github.com/rafaelcaricio/tornado_pyvows https://pypi.python.org/pypi/tornado_pyvows"
23
24 LICENSE="MIT"
25 SLOT="0"
26 KEYWORDS="~amd64 ~x86"
27 IUSE="test"
28
29 RDEPEND="
30         dev-python/pycurl[${PYTHON_USEDEP}]
31         <=dev-python/pyvows-2.0.3[${PYTHON_USEDEP}]
32         dev-python/urllib3[${PYTHON_USEDEP}]
33         www-servers/tornado[${PYTHON_USEDEP}]
34         "
35 DEPEND="
36         test? (
37                 ${RDEPEND}
38                 dev-python/mock[${PYTHON_USEDEP}]
39         )"
40
41 S="${WORKDIR}/${MY_P}"
42
43 python_test() {
44         "${EPYTHON}" -c 'import pyvows.cli; pyvows.cli.main()' vows/ || die "tests failed with ${EPYTHON}"
45 }