e54be9d2ba4660d497b264be4ec3e38b3c05b9d2
[gentoo.git] / dev-python / raet / raet-0.6.8.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=(python{2_7,3_6})
6 inherit distutils-r1
7
8 DESCRIPTION="Reliable Asynchronous Event Transport Protocol"
9 HOMEPAGE="https://github.com/RaetProtocol/raet"
10 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
11
12 LICENSE="Apache-2.0"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="test"
16 RESTRICT="!test? ( test )"
17
18 RDEPEND=">=dev-python/six-1.6.1[${PYTHON_USEDEP}]
19         >=dev-python/libnacl-1.4.3[${PYTHON_USEDEP}]
20         >=dev-python/ioflo-1.5[${PYTHON_USEDEP}]
21         python_targets_python2_7? ( >=dev-python/enum34-1.0.4[$(python_gen_usedep 'python2*')] )"
22 DEPEND="${RDEPEND}
23         dev-python/setuptools[${PYTHON_USEDEP}]
24         test? ( dev-python/unittest2[${PYTHON_USEDEP}] )"
25
26 python_prepare_all() {
27         distutils-r1_python_prepare_all
28         sed -i -e "/setuptools_git/d" setup.py || die
29 }
30
31 python_test() {
32         pushd "${BUILD_DIR}"/lib || die
33         ${EPYTHON} ${PN}/test/__init__.py || die "tests failed for ${EPYTHON}"
34         popd || die
35 }