app-editors/kakoune: drop old 0_pre20160620
[gentoo.git] / net-misc / streamlink / streamlink-0.4.0.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python{2_7,3_4,3_5} )
7 PYTHON_REQ_USE='xml(+),threads(+)'
8
9 inherit distutils-r1
10
11 DESCRIPTION="CLI for extracting streams from websites to a video player of your choice"
12 HOMEPAGE="https://streamlink.github.io/"
13 SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
14
15 KEYWORDS="~amd64 ~x86"
16 LICENSE="BSD-2 Apache-2.0"
17 SLOT="0"
18 IUSE="doc test"
19
20 RDEPEND="dev-python/pycryptodome[${PYTHON_USEDEP}]
21         dev-python/requests[${PYTHON_USEDEP}]
22         virtual/python-futures[${PYTHON_USEDEP}]
23         virtual/python-singledispatch[${PYTHON_USEDEP}]
24         dev-python/backports-shutil_which[$(python_gen_usedep 'python2*')]
25         dev-python/backports-shutil_get_terminal_size[$(python_gen_usedep 'python2*')]
26         dev-python/pycountry[${PYTHON_USEDEP}]
27         media-video/rtmpdump
28         virtual/ffmpeg"
29 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
30         doc? ( dev-python/sphinx[${PYTHON_USEDEP}]
31                 dev-python/docutils[${PYTHON_USEDEP}] )
32         test? ( dev-python/mock[$(python_gen_usedep 'python2*')]
33                 ${RDEPEND} )"
34
35 python_configure_all() {
36         # Avoid iso-639, iso3166 dependencies since we use pycountry.
37         export STREAMLINK_USE_PYCOUNTRY=1
38 }
39
40 python_compile_all() {
41         use doc && emake -C docs html
42 }
43
44 python_test() {
45         esetup.py test
46 }
47
48 python_install_all() {
49         use doc && local HTML_DOCS=( docs/_build/html/. )
50         distutils-r1_python_install_all
51 }