diff options
author | Sam James (sam_c) <sam@cmpct.info> | 2020-06-17 20:44:06 +0000 |
---|---|---|
committer | Aaron Bauman <bman@gentoo.org> | 2020-06-19 20:22:35 -0400 |
commit | 131ece7fff304dae10e8efb0fb600c5751092900 (patch) | |
tree | ed8acd27ac6ab2c4bfdf500558eb5235bd67b314 /media-video/subliminal/subliminal-9999.ebuild | |
parent | media-video/subliminal: Sync live (diff) | |
download | gentoo-131ece7fff304dae10e8efb0fb600c5751092900.tar.gz gentoo-131ece7fff304dae10e8efb0fb600c5751092900.tar.bz2 gentoo-131ece7fff304dae10e8efb0fb600c5751092900.zip |
media-video/subliminal: rewrite live ebuild to be agnostic
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sam James (sam_c) <sam@cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/16084
Signed-off-by: Aaron Bauman <bman@gentoo.org>
Diffstat (limited to 'media-video/subliminal/subliminal-9999.ebuild')
-rw-r--r-- | media-video/subliminal/subliminal-9999.ebuild | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/media-video/subliminal/subliminal-9999.ebuild b/media-video/subliminal/subliminal-9999.ebuild index 3043809fda4e..54ade49d6223 100644 --- a/media-video/subliminal/subliminal-9999.ebuild +++ b/media-video/subliminal/subliminal-9999.ebuild @@ -7,17 +7,24 @@ PYTHON_COMPAT=( python3_{6,7} ) PYTHON_REQ_USE='xml(+)' DISTUTILS_USE_SETUPTOOLS=rdepend -inherit distutils-r1 git-r3 +inherit distutils-r1 + +SRC_URI="" + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/Diaoul/${PN}.git" + EGIT_BRANCH="develop" +else + SRC_URI="https://github.com/Diaoul/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +fi DESCRIPTION="Python library to search and download subtitles" HOMEPAGE="https://github.com/Diaoul/subliminal https://pypi.org/project/subliminal/" -EGIT_REPO_URI="https://github.com/Diaoul/${PN}.git" -EGIT_BRANCH="develop" -SRC_URI="test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )" +SRC_URI+=" test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )" LICENSE="MIT" SLOT="0" -KEYWORDS="" IUSE="test" RESTRICT="!test? ( test )" @@ -53,8 +60,12 @@ PATCHES=( distutils_enable_tests pytest src_unpack() { - default_src_unpack - git-r3_src_unpack + # Needed to unpack the test data + default + + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + fi } python_prepare_all() { @@ -64,7 +75,7 @@ python_prepare_all() { # Disable unconditional dependency on dev-python/pytest-runner. sed -i -e "s|'pytest-runner'||g" setup.py || die - if use test; then + if use test ; then mkdir -p tests/data/mkv || die ln -s "${WORKDIR}"/test*.mkv tests/data/mkv/ || die fi |