1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_{6,7} pypy3 )
10 DESCRIPTION="library with cross-python path, ini-parsing, io, code, log facilities"
11 HOMEPAGE="https://pylib.readthedocs.io/en/latest/ https://pypi.org/project/py/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
18 RESTRICT="!test? ( test )"
22 dev-python/setuptools[${PYTHON_USEDEP}]
23 dev-python/setuptools_scm[${PYTHON_USEDEP}]
24 test? ( >=dev-python/pytest-2.4.2[${PYTHON_USEDEP}] )
25 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
27 PATCHES=( "${FILESDIR}"/${PN}-1.5.2-skip-apiwarn-pytest31.patch )
29 python_prepare_all() {
30 sed -e 's:intersphinx_mapping:#&:' -i doc/conf.py || die
31 distutils-r1_python_prepare_all
34 python_compile_all() {
35 use doc && emake -C doc html
39 # 1 failure, test_comments, under both pypy only.
40 # Also appears the home repo has no issue tracker.
41 [[ "${EPYTHON}" == pypy ]] && return
42 py.test -v -v || die "testing failed with ${EPYTHON}"
45 python_install_all() {
46 use doc && local HTML_DOCS=( doc/_build/html/. )
47 distutils-r1_python_install_all