sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / dev-python / py / py-1.8.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} pypy3 )
7
8 inherit distutils-r1
9
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"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 IUSE="doc"
18
19 BDEPEND="
20         dev-python/setuptools[${PYTHON_USEDEP}]
21         dev-python/setuptools_scm[${PYTHON_USEDEP}]
22         doc? ( dev-python/sphinx )"
23
24 PATCHES=(
25         "${FILESDIR}"/${PN}-1.5.2-skip-apiwarn-pytest31.patch
26         "${FILESDIR}"/${P}-pytest-4.patch
27 )
28
29 distutils_enable_tests pytest
30
31 python_prepare_all() {
32         sed -e 's:intersphinx_mapping:#&:' -i doc/conf.py || die
33
34         distutils-r1_python_prepare_all
35
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
42         # broken on py3.9, this package is just dead
43         sed -i -e 's:test_excinfo_\(repr\|set\):_&:' \
44                 -e 's:test_format_excinfo:_&:' \
45                 -e 's:test_excinfo_str:_&:' \
46                 testing/code/test_excinfo.py || die
47         sed -i -e 's:test_getfslineno:_&:' \
48                 testing/code/test_source.py || die
49 }
50
51 python_compile_all() {
52         use doc && emake -C doc html
53 }
54
55 python_install_all() {
56         use doc && local HTML_DOCS=( doc/_build/html/. )
57         distutils-r1_python_install_all
58 }