summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Tumaykin <itumaykin@gmail.com>2017-01-14 00:30:04 +0300
committerDavid Seifert <soap@gentoo.org>2017-01-15 14:33:53 +0100
commit548c4688c92f957b679d4f70e9e0df1c926ac32f (patch)
tree39062faabbfafbded9d14d4cf89f014064c9b965 /media-video/subliminal/subliminal-9999.ebuild
parentmedia-gfx/openvdb: Version bump to 4.0.0 (diff)
downloadgentoo-548c4688c92f957b679d4f70e9e0df1c926ac32f.tar.gz
gentoo-548c4688c92f957b679d4f70e9e0df1c926ac32f.tar.bz2
gentoo-548c4688c92f957b679d4f70e9e0df1c926ac32f.zip
media-video/subliminal: make tests work offline in 9999
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'media-video/subliminal/subliminal-9999.ebuild')
-rw-r--r--media-video/subliminal/subliminal-9999.ebuild15
1 files changed, 12 insertions, 3 deletions
diff --git a/media-video/subliminal/subliminal-9999.ebuild b/media-video/subliminal/subliminal-9999.ebuild
index 07d66ee0ad8d..0c524dd13486 100644
--- a/media-video/subliminal/subliminal-9999.ebuild
+++ b/media-video/subliminal/subliminal-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -13,6 +13,7 @@ DESCRIPTION="Python library to search and download subtitles"
HOMEPAGE="https://github.com/Diaoul/subliminal https://pypi.python.org/pypi/subliminal"
EGIT_REPO_URI=( {https,git}://github.com/Diaoul/${PN}.git )
EGIT_BRANCH="develop"
+SRC_URI="test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )"
LICENSE="MIT"
SLOT="0"
@@ -39,6 +40,7 @@ RDEPEND="
"
DEPEND="${RDEPEND}
test? (
+ app-arch/unzip
>=dev-python/vcrpy-1.6.1[${PYTHON_USEDEP}]
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-cov[${PYTHON_USEDEP}]
@@ -48,8 +50,10 @@ DEPEND="${RDEPEND}
)
"
-# Tests require network.
-RESTRICT=test
+src_unpack() {
+ default_src_unpack
+ git-r3_src_unpack
+}
python_prepare_all() {
# Disable code checkers as they require unavailable dependencies.
@@ -59,6 +63,11 @@ 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
+ mkdir -p tests/data/mkv || die
+ ln -s "${WORKDIR}"/test*.mkv tests/data/mkv/ || die
+ fi
+
distutils-r1_python_prepare_all
}