*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / pyzbar / pyzbar-0.1.5.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} )
7 inherit distutils-r1
8
9 DESCRIPTION="Read one-dimensional barcodes and QR codes from Python"
10 HOMEPAGE="https://github.com/NaturalHistoryMuseum/pyzbar/"
11 SRC_URI="https://github.com/NaturalHistoryMuseum/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="test"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND="
20         dev-python/pillow[${PYTHON_USEDEP}]
21         media-gfx/zbar
22         virtual/python-enum34[${PYTHON_USEDEP}]
23         virtual/python-pathlib[${PYTHON_USEDEP}]
24 "
25
26 DEPEND="
27         ${RDEPEND}
28         dev-python/setuptools[${PYTHON_USEDEP}]
29         test? (
30                 virtual/python-unittest-mock[${PYTHON_USEDEP}]
31                 dev-python/numpy[${PYTHON_USEDEP}]
32         )
33 "
34
35 python_test() {
36         "${EPYTHON}" -m unittest discover -v || die "Testing failed with ${EPYTHON}"
37 }