1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python2_7 )
7 inherit twisted-r1 eutils
9 DESCRIPTION="Epsilon is a Python utilities package, most famous for its Time class"
10 HOMEPAGE="https://github.com/twisted/epsilon https://pypi.org/project/Epsilon/"
11 SRC_URI="mirror://pypi/${TWISTED_PN:0:1}/${TWISTED_PN}/${TWISTED_P}.tar.gz"
13 KEYWORDS="amd64 ppc ppc64 sparc x86"
15 RESTRICT="!test? ( test )"
17 RDEPEND=">=dev-python/twisted-core-13.2.0[${PYTHON_USEDEP}]
18 >=dev-python/pyopenssl-0.13[${PYTHON_USEDEP}]"
19 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
20 test? ( dev-python/nose[${PYTHON_USEDEP}] )
23 PATCHES=( "${FILESDIR}/epsilon_plugincache_portagesandbox.patch" )
25 # epsilon doesn't install any plugins, so override the default
28 python_prepare_all() {
29 # Rename to avoid file-collisions
30 mv bin/benchmark bin/epsilon-benchmark
32 -e "s#bin/benchmark#bin/epsilon-benchmark#" \
33 setup.py || die "sed failed"
35 #These test are removed upstream
36 rm -f epsilon/test/test_sslverify.py epsilon/sslverify.py || die
37 #See bug 357157 comment 5 for Ian Delaney's explanation of this fix
38 sed -e 's:month) 2004 9:month) 2004 14:' \
39 -i epsilon/test/test_extime.py || die
40 # Release tests need DivmodCombinator.
41 rm -f epsilon/test/test_release.py* epsilon/release.py || die
43 distutils-r1_python_prepare_all
46 python_install_all() {
47 dodoc NAME.txt NEWS.txt
49 distutils-r1_python_install_all
52 #Lets run some tests, having prepped them
54 # No testrunner seems stipulated within the source; pytest and nosetests both work
55 nosetests ${PN}/test || die "testsuite failed under ${EPYTHON}"