*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / PyPDF2 / PyPDF2-1.26.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python2_7 python3_6 )
7
8 inherit distutils-r1
9
10 DESCRIPTION="Python library to work with pdf files"
11 HOMEPAGE="https://pypi.org/project/${PN}/ https://github.com/mstamy2/PyPDF2"
12 SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="BSD-2"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="examples"
18
19 PATCHES=( "${FILESDIR}/${P}-py3-tests.patch" )
20
21 python_test() {
22         "${EPYTHON}" -m unittest Tests.tests || die "Tests failed under ${EPYTHON}"
23 }
24
25 python_install_all() {
26         if use examples; then
27                 docinto examples
28                 dodoc -r Sample_Code/.
29                 docompress -x /usr/share/doc/${PF}/examples
30         fi
31         distutils-r1_python_install_all
32 }