1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
7 DISTUTILS_USE_SETUPTOOLS=rdepend
12 DESCRIPTION="Tools to supplement packaging Python releases"
13 HOMEPAGE="https://github.com/jaraco/jaraco.packaging"
14 SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
15 S="${WORKDIR}/${MY_PN}-${PV}"
19 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86"
21 RESTRICT="!test? ( test )"
24 dev-python/importlib_metadata[${PYTHON_USEDEP}]
25 >=dev-python/namespace-jaraco-2[${PYTHON_USEDEP}]
26 >=dev-python/six-1.4[${PYTHON_USEDEP}]
29 dev-python/toml[${PYTHON_USEDEP}]
30 >=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
33 >=dev-python/pytest-2.8[${PYTHON_USEDEP}]
37 distutils_enable_sphinx docs '>=dev-python/rst-linker-1.9'
40 # Skip one test which requires network access
41 # Override pytest options to skip flake8
42 PYTHONPATH=. pytest -vv -k "not test_revived_distribution" \
43 --override-ini="addopts=--doctest-modules" \
44 || die "tests failed with ${EPYTHON}"
47 # https://wiki.gentoo.org/wiki/Project:Python/Namespace_packages#File_collisions_between_pkgutil-style_packages
49 rm "${BUILD_DIR}"/lib/jaraco/__init__.py || die
50 # note: eclass may default to --skip-build in the future
51 distutils-r1_python_install --skip-build