1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
10 DESCRIPTION="A collection of helpers and mock objects for unit tests and doc tests"
11 HOMEPAGE="https://pypi.org/project/testfixtures/ https://github.com/Simplistix/testfixtures"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
18 RESTRICT="!test? ( test )"
21 dev-python/setuptools[${PYTHON_USEDEP}]
23 dev-python/sphinx[${PYTHON_USEDEP}]
26 dev-python/django[${PYTHON_USEDEP}]
27 dev-python/pytest[${PYTHON_USEDEP}]
28 dev-python/pytest-django[${PYTHON_USEDEP}]
29 dev-python/sybil[${PYTHON_USEDEP}]
30 >=dev-python/twisted-18[${PYTHON_USEDEP}]
31 dev-python/zope-component[${PYTHON_USEDEP}]
34 python_prepare_all() {
35 # Prevent un-needed download during build, fix Makefile for doc build
36 sed -e '/'sphinx.ext.intersphinx'/d' -i docs/conf.py || die
38 # remove test that tests the stripped zope-component test_components.ComponentsTests
39 rm -f testfixtures/tests/test_components.py docs/components.txt || die
40 distutils-r1_python_prepare_all
43 python_compile_all() {
44 use doc && emake -C docs html
49 DJANGO_SETTINGS_MODULE=testfixtures.tests.test_django.settings \
53 python_install_all() {
54 use doc && HTML_DOCS=( docs/_build/html/. )
55 distutils-r1_python_install_all