kde-apps/spectacle: x86 stable wrt bug #679994
[gentoo.git] / dev-python / pymediainfo / pymediainfo-3.0.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( pypy{,3} python{2_7,3_{4,5,6,7}} )
7 PYTHON_REQ_USE="xml(+)"
8
9 inherit distutils-r1
10
11 DESCRIPTION="A wrapper around the mediainfo library"
12 HOMEPAGE="https://github.com/sbraz/pymediainfo"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="doc test"
19
20 RDEPEND="
21         dev-python/setuptools[${PYTHON_USEDEP}]
22         media-libs/libmediainfo
23 "
24 BDEPEND="
25         dev-python/setuptools[${PYTHON_USEDEP}]
26         dev-python/setuptools_scm[${PYTHON_USEDEP}]
27         doc? (
28                 dev-python/alabaster[${PYTHON_USEDEP}]
29                 dev-python/sphinx[${PYTHON_USEDEP}]
30         )
31         test? (
32                 ${RDEPEND}
33                 dev-python/pytest[${PYTHON_USEDEP}]
34         )
35 "
36
37 python_compile_all() {
38         if use doc; then
39                 sphinx-build docs docs/_build/html || die
40                 HTML_DOCS=( docs/_build/html/. )
41         fi
42 }
43
44 python_test() {
45         # Skip a test which requires network access
46         pytest -vv tests/test_pymediainfo.py -k "not MediaInfoURLTest" \
47                 || die "tests failed with ${EPYTHON}"
48 }