1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 PYTHON_COMPAT=( pypy3 python{2_7,3_{5,6,7}} )
12 DESCRIPTION="Classes used by other projects by developer jaraco"
13 HOMEPAGE="https://github.com/jaraco/jaraco.classes"
14 SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
18 KEYWORDS="~amd64 ~arm64 ~x86"
22 >=dev-python/namespace-jaraco-2[${PYTHON_USEDEP}]
23 dev-python/six[${PYTHON_USEDEP}]
26 dev-python/setuptools[${PYTHON_USEDEP}]
27 >=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
29 >=dev-python/jaraco-packaging-3.2[${PYTHON_USEDEP}]
30 >=dev-python/rst-linker-1.9[${PYTHON_USEDEP}]
31 dev-python/sphinx[${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 # Avoid ImportMismatchError, override pytest options to skip flake8
51 pytest -vv "${BUILD_DIR}"/lib --override-ini="addopts=--doctest-modules" \
52 || die "tests failed with ${EPYTHON}"
55 # https://wiki.gentoo.org/wiki/Project:Python/Namespace_packages#File_collisions_between_pkgutil-style_packages
57 rm "${BUILD_DIR}"/lib/jaraco/__init__.py || die
58 # note: eclass may default to --skip-build in the future
59 distutils-r1_python_install --skip-build