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="Routines for handling streaming data"
12 HOMEPAGE="https://github.com/jaraco/jaraco.stream"
13 SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
17 KEYWORDS="~amd64 ~x86"
19 RESTRICT="!test? ( test )"
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}]
30 >=dev-python/pytest-2.8[${PYTHON_USEDEP}]
31 dev-python/more-itertools[${PYTHON_USEDEP}]
34 >=dev-python/jaraco-packaging-3.2[${PYTHON_USEDEP}]
35 >=dev-python/rst-linker-1.9[${PYTHON_USEDEP}]
36 dev-python/sphinx[${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 # Skip one test which requires network access
51 # Override pytest options to skip flake8
52 PYTHONPATH=. pytest -vv --ignore=jaraco/stream/test_gzip.py \
53 --override-ini="addopts=--doctest-modules" \
54 || die "tests failed with ${EPYTHON}"
57 # https://wiki.gentoo.org/wiki/Project:Python/Namespace_packages#File_collisions_between_pkgutil-style_packages
59 rm "${BUILD_DIR}"/lib/jaraco/__init__.py || die
60 # note: eclass may default to --skip-build in the future
61 distutils-r1_python_install --skip-build