1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 # It is the developer's intention that backports.unittest_mock will be
7 # used even for Python 3: https://github.com/jaraco/jaraco.timing/pull/1
8 PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy{,3} )
14 DESCRIPTION="Backport of unittest.mock"
15 HOMEPAGE="https://github.com/jaraco/backports.unittest_mock"
16 SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
20 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
22 RESTRICT="!test? ( test )"
24 RDEPEND="dev-python/backports[${PYTHON_USEDEP}]
25 dev-python/mock[${PYTHON_USEDEP}]"
26 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
27 >=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
29 dev-python/jaraco-packaging[${PYTHON_USEDEP}]
30 >=dev-python/rst-linker-1.9[${PYTHON_USEDEP}]
31 >=dev-python/sphinx-1.5.2[${PYTHON_USEDEP}]
35 >=dev-python/pytest-2.8[${PYTHON_USEDEP}]
39 S="${WORKDIR}/${MY_PN}-${PV}"
41 python_compile_all() {
44 sphinx-build . _build/html || die
45 HTML_DOCS=( docs/_build/html/. )
50 py.test -v || die "tests failed with ${EPYTHON}"
54 # avoid a collision with dev-python/backports
55 rm "${BUILD_DIR}"/lib/backports/__init__.py || die
56 distutils-r1_python_install --skip-build