1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 pypy3 )
10 DESCRIPTION="A Python Mocking and Patching Library for Testing"
11 HOMEPAGE="http://www.voidspace.org.uk/python/mock/ https://pypi.org/project/mock/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
18 RESTRICT="!test? ( test )"
20 # dev-python/unittest2 is not required with Python >=3.2.
21 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
23 dev-python/nose[${PYTHON_USEDEP}]
24 $(python_gen_cond_dep 'dev-python/unittest2[${PYTHON_USEDEP}]' python2_7 pypy)
28 PATCHES=( "${FILESDIR}"/${P}-fix-python3.4.patch )
31 nosetests || die "Tests fail with ${EPYTHON}"
34 python_install_all() {
35 local DOCS=( docs/*.txt )
37 distutils-r1_python_install_all
40 dohtml -r html/ -x html/objects.inv -x html/output.txt -x html/_sources