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,8} 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"
20 dev-python/setuptools[${PYTHON_USEDEP}]
21 dev-python/setuptools_scm[${PYTHON_USEDEP}]
22 doc? ( dev-python/sphinx )"
25 "${FILESDIR}"/${PN}-1.5.2-skip-apiwarn-pytest31.patch
26 "${FILESDIR}"/${P}-pytest-4.patch
29 distutils_enable_tests pytest
31 python_prepare_all() {
32 sed -e 's:intersphinx_mapping:#&:' -i doc/conf.py || die
34 distutils-r1_python_prepare_all
36 # broken, and relying on exact assertion strings
37 rm testing/code/test_assertion.py || die
38 # broken on py3.8, don't seem important
39 sed -i -e 's:test_syntaxerror_rerepresentation:_&:' \
40 -e 's:test_comments:_&:' \
41 testing/code/test_source.py || die
44 python_compile_all() {
45 use doc && emake -C doc html
48 python_install_all() {
49 use doc && local HTML_DOCS=( doc/_build/html/. )
50 distutils-r1_python_install_all