1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( pypy3 python{2_7,3_{6,7}} )
11 DESCRIPTION="Sphinx plugin to add links and timestamps to the changelog"
12 HOMEPAGE="https://github.com/jaraco/rst.linker"
13 SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
17 KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
19 RESTRICT="!test? ( test )"
22 dev-python/importlib_metadata[${PYTHON_USEDEP}]
23 dev-python/python-dateutil[${PYTHON_USEDEP}]
24 dev-python/six[${PYTHON_USEDEP}]
27 dev-python/setuptools[${PYTHON_USEDEP}]
28 >=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
30 >=dev-python/jaraco-packaging-3.2[${PYTHON_USEDEP}]
31 dev-python/sphinx[${PYTHON_USEDEP}]
35 dev-python/path-py[${PYTHON_USEDEP}]
36 >=dev-python/pytest-3.4[${PYTHON_USEDEP}]
40 S="${WORKDIR}/${MY_PN}-${PV}"
42 python_compile_all() {
44 sphinx-build docs docs/_build/html || die
45 HTML_DOCS=( docs/_build/html/. )
50 # Ignore the module from ${S}, use the one from ${BUILD_DIR}
51 # Otherwise, ImportMismatchError may occur
52 # https://github.com/gentoo/gentoo/pull/1622#issuecomment-224482396
53 # Override pytest options to skip flake8
54 py.test -v --ignore=rst --override-ini="addopts=--doctest-modules" \
55 || die "tests failed with ${EPYTHON}"