1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{5,6} )
12 EGIT_COMMIT="ed327c4e1ebbe1fe949be81723527cfda87aeb8d"
14 DESCRIPTION="John Hoffman's fork of the original bittorrent"
15 HOMEPAGE="https://github.com/effigies/BitTornado"
16 SRC_URI="https://github.com/effigies/BitTornado/archive/${EGIT_COMMIT}.tar.gz -> ${MY_P}.tar.gz"
17 # GPL-2 is just for the init script from FILESDIR.
21 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
23 RESTRICT="!test? ( test )"
27 dev-python/pycryptodome[${PYTHON_USEDEP}]
28 dev-python/pycrypto[${PYTHON_USEDEP}]
30 DEPEND="test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
32 S=${WORKDIR}/${MY_PN}-${EGIT_COMMIT}
34 python_prepare_all() {
35 # https://github.com/effigies/BitTornado/pull/53
36 sed -e 's:"BitTornado.Tracker":\0, "BitTornado.Types":' -i setup.py || die
37 distutils-r1_python_prepare_all
41 py.test -v BitTornado/tests || die "tests failed with ${EPYTHON}"
44 python_install_all() {
45 distutils-r1_python_install_all
47 newconfd "${FILESDIR}"/bttrack.conf bttrack
48 newinitd "${FILESDIR}"/bttrack.rc bttrack