*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / enzyme / enzyme-0.4.1-r2.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=( python{2_7,3_6} )
7 PYTHON_REQ_USE='xml(+)'
8
9 inherit distutils-r1
10
11 DESCRIPTION="Python video metadata parser"
12 HOMEPAGE="https://github.com/Diaoul/enzyme https://pypi.org/project/enzyme/"
13 SRC_URI="
14         mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
15         test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )
16 "
17
18 LICENSE="Apache-2.0"
19 SLOT="0"
20 KEYWORDS="amd64 x86"
21 IUSE="test"
22 RESTRICT="!test? ( test )"
23
24 RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
25 DEPEND="${RDEPEND}
26         test? (
27                 app-arch/unzip
28                 dev-python/pyyaml[${PYTHON_USEDEP}]
29                 dev-python/requests[${PYTHON_USEDEP}]
30         )
31 "
32
33 python_prepare_all() {
34         if use test; then
35                 mkdir enzyme/tests/test_{mkv,parsers} || die
36                 ln -s "${WORKDIR}"/test*.mkv enzyme/tests/test_mkv/ || die
37                 ln -s "${WORKDIR}"/test*.mkv enzyme/tests/test_parsers/ || die
38         fi
39
40         distutils-r1_python_prepare_all
41 }
42
43 python_test() {
44         esetup.py test
45 }