diff options
author | Nikos Chantziaras <realnc@gmail.com> | 2019-05-22 00:23:34 +0300 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-07-07 07:28:14 +0200 |
commit | 23a6f6ffd9eb75e5768607c4f7a54030f6ebb53b (patch) | |
tree | 5982d4d5e9fe9e90c84fe2ebca4e2ae1294ec021 /media-video/subliminal | |
parent | app-misc/lcd4linux: drop background from init script (diff) | |
download | gentoo-23a6f6ffd9eb75e5768607c4f7a54030f6ebb53b.tar.gz gentoo-23a6f6ffd9eb75e5768607c4f7a54030f6ebb53b.tar.bz2 gentoo-23a6f6ffd9eb75e5768607c4f7a54030f6ebb53b.zip |
media-video/subliminal: add dev-python/decorator dep, EAPI 7, sort deps
Closes: https://bugs.gentoo.org/686514
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Nikos Chantziaras <realnc@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/12073
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'media-video/subliminal')
-rw-r--r-- | media-video/subliminal/subliminal-2.0.5-r3.ebuild | 80 | ||||
-rw-r--r-- | media-video/subliminal/subliminal-9999.ebuild | 25 |
2 files changed, 93 insertions, 12 deletions
diff --git a/media-video/subliminal/subliminal-2.0.5-r3.ebuild b/media-video/subliminal/subliminal-2.0.5-r3.ebuild new file mode 100644 index 000000000000..28b3e4c46bdb --- /dev/null +++ b/media-video/subliminal/subliminal-2.0.5-r3.ebuild @@ -0,0 +1,80 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_5,3_6} ) +PYTHON_REQ_USE='xml(+)' +COMMIT_ID='dd74383d1cba82829ce720f2e439a65d13ffe7ef' + +inherit distutils-r1 + +DESCRIPTION="Python library to search and download subtitles" +HOMEPAGE="https://github.com/Diaoul/subliminal https://pypi.org/project/subliminal/" +SRC_URI=" + https://github.com/Diaoul/${PN}/archive/${COMMIT_ID}.tar.gz -> ${P}-r2.tar.gz + test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip ) +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=" + >=dev-python/appdirs-1.3[${PYTHON_USEDEP}] + >=dev-python/babelfish-0.5.2[${PYTHON_USEDEP}] + >=dev-python/beautifulsoup-4.4.0:4[${PYTHON_USEDEP}] + >=dev-python/chardet-2.3.0[${PYTHON_USEDEP}] + >=dev-python/click-4.0[${PYTHON_USEDEP}] + dev-python/decorator[${PYTHON_USEDEP}] + >=dev-python/dogpile-cache-0.6.0[${PYTHON_USEDEP}] + >=dev-python/enzyme-0.4.1[${PYTHON_USEDEP}] + >=dev-python/guessit-2.0.1[${PYTHON_USEDEP}] + >=dev-python/pysrt-1.0.1[${PYTHON_USEDEP}] + >=dev-python/pytz-2012c[${PYTHON_USEDEP}] + >=dev-python/rarfile-2.7[compressed,${PYTHON_USEDEP}] + >=dev-python/requests-2.0[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.0.0[${PYTHON_USEDEP}] + virtual/python-futures[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + test? ( + app-arch/unzip + $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) + dev-python/pytest-cov[${PYTHON_USEDEP}] + dev-python/pytest-runner[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] + dev-python/sympy[${PYTHON_USEDEP}] + >=dev-python/vcrpy-1.6.1[${PYTHON_USEDEP}] + ) +" + +# Tests don't work in 2.0.5. Recheck in later versions. See Gentoo bug 630114. +RESTRICT=test + +PATCHES=( "${FILESDIR}/${P}-add-missing-comma.patch" ) + +S="${WORKDIR}/${PN}-${COMMIT_ID}" + +python_prepare_all() { + # Disable code checkers as they require unavailable dependencies. + sed -i -e 's/--\(pep8\|flakes\)//g' pytest.ini || die + sed -i -e "s/'pytest-\(pep8\|flakes\)',//g" setup.py || die + + # Disable unconditional dependency on dev-python/pytest-runner. + sed -i -e "s|'pytest-runner'||g" setup.py || die + + if use test; then + mkdir -p tests/data/mkv || die + ln -s "${WORKDIR}"/test*.mkv tests/data/mkv/ || die + fi + + distutils-r1_python_prepare_all +} + +python_test() { + esetup.py test +} diff --git a/media-video/subliminal/subliminal-9999.ebuild b/media-video/subliminal/subliminal-9999.ebuild index 95473f3790c2..7c83f3864f02 100644 --- a/media-video/subliminal/subliminal-9999.ebuild +++ b/media-video/subliminal/subliminal-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 PYTHON_COMPAT=( python{2_7,3_5,3_6} ) PYTHON_REQ_USE='xml(+)' @@ -20,32 +20,33 @@ KEYWORDS="" IUSE="test" RDEPEND=" - >=dev-python/guessit-2.0.1[${PYTHON_USEDEP}] + >=dev-python/appdirs-1.3[${PYTHON_USEDEP}] >=dev-python/babelfish-0.5.2[${PYTHON_USEDEP}] - >=dev-python/enzyme-0.4.1[${PYTHON_USEDEP}] >=dev-python/beautifulsoup-4.4.0:4[${PYTHON_USEDEP}] - >=dev-python/requests-2.0[${PYTHON_USEDEP}] + >=dev-python/chardet-2.3.0[${PYTHON_USEDEP}] >=dev-python/click-4.0[${PYTHON_USEDEP}] + dev-python/decorator[${PYTHON_USEDEP}] >=dev-python/dogpile-cache-0.6.0[${PYTHON_USEDEP}] - >=dev-python/stevedore-1.0.0[${PYTHON_USEDEP}] - >=dev-python/chardet-2.3.0[${PYTHON_USEDEP}] + >=dev-python/enzyme-0.4.1[${PYTHON_USEDEP}] + >=dev-python/guessit-2.0.1[${PYTHON_USEDEP}] >=dev-python/pysrt-1.0.1[${PYTHON_USEDEP}] - >=dev-python/six-1.9.0[${PYTHON_USEDEP}] - >=dev-python/appdirs-1.3[${PYTHON_USEDEP}] - >=dev-python/rarfile-2.7[compressed,${PYTHON_USEDEP}] >=dev-python/pytz-2012c[${PYTHON_USEDEP}] + >=dev-python/rarfile-2.7[compressed,${PYTHON_USEDEP}] + >=dev-python/requests-2.0[${PYTHON_USEDEP}] dev-python/setuptools[${PYTHON_USEDEP}] + >=dev-python/six-1.9.0[${PYTHON_USEDEP}] + >=dev-python/stevedore-1.0.0[${PYTHON_USEDEP}] virtual/python-futures[${PYTHON_USEDEP}] " DEPEND="${RDEPEND} test? ( app-arch/unzip - >=dev-python/vcrpy-1.6.1[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] + $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) dev-python/pytest-cov[${PYTHON_USEDEP}] dev-python/pytest-runner[${PYTHON_USEDEP}] + dev-python/pytest[${PYTHON_USEDEP}] dev-python/sympy[${PYTHON_USEDEP}] - $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7) + >=dev-python/vcrpy-1.6.1[${PYTHON_USEDEP}] ) " |