*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / zipp / zipp-0.5.2.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=( pypy3 python{2_7,3_{6,7}} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Backport of pathlib-compatible object wrapper for zip files"
11 HOMEPAGE="https://github.com/jaraco/zipp"
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 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
17 IUSE="doc test"
18 RESTRICT="!test? ( test )"
19
20 BDEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         >=dev-python/setuptools_scm-1.15.0[${PYTHON_USEDEP}]
23         test? (
24                 dev-python/contextlib2[${PYTHON_USEDEP}]
25                 dev-python/pathlib2[${PYTHON_USEDEP}]
26                 dev-python/pytest[${PYTHON_USEDEP}]
27                 dev-python/unittest2[${PYTHON_USEDEP}]
28         )
29         doc? (
30                 >=dev-python/jaraco-packaging-3.2[${PYTHON_USEDEP}]
31                 >=dev-python/rst-linker-1.9[${PYTHON_USEDEP}]
32                 dev-python/sphinx[${PYTHON_USEDEP}]
33         )
34 "
35
36 python_compile_all() {
37         if use doc; then
38                 sphinx-build docs docs/_build/html || die
39                 HTML_DOCS=( docs/_build/html/. )
40         fi
41 }
42
43 python_test() {
44         pytest -vv || die "tests failed with ${EPYTHON}"
45 }