diff options
Diffstat (limited to 'media-video/subliminal/subliminal-2.1.0.ebuild')
-rw-r--r-- | media-video/subliminal/subliminal-2.1.0.ebuild | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/media-video/subliminal/subliminal-2.1.0.ebuild b/media-video/subliminal/subliminal-2.1.0.ebuild index 9b14d3b30165..48473f15489b 100644 --- a/media-video/subliminal/subliminal-2.1.0.ebuild +++ b/media-video/subliminal/subliminal-2.1.0.ebuild @@ -9,12 +9,19 @@ DISTUTILS_USE_SETUPTOOLS=rdepend 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/" -SRC_URI=" - https://github.com/Diaoul/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz - 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" @@ -53,6 +60,15 @@ PATCHES=( distutils_enable_tests pytest +src_unpack() { + # Needed to unpack the test data + default + + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + fi +} + python_prepare_all() { # Disable code checkers as they require unavailable dependencies. sed -i -e 's/--\(pep8\|flakes\)//g' pytest.ini || die @@ -60,7 +76,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 |