diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-06-21 17:50:24 +0100 |
commit | feb0daf81d888e9160f9f94502de09b66f2a63fd (patch) | |
tree | b6e5c40ce2abef3da27ed50a023153f475e0ddef /media-video/subliminal | |
parent | 9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff) |
gentoo resync : 21.06.2020
Diffstat (limited to 'media-video/subliminal')
-rw-r--r-- | media-video/subliminal/Manifest | 4 | ||||
-rw-r--r-- | media-video/subliminal/subliminal-2.1.0.ebuild | 26 | ||||
-rw-r--r-- | media-video/subliminal/subliminal-9999.ebuild | 55 |
3 files changed, 66 insertions, 19 deletions
diff --git a/media-video/subliminal/Manifest b/media-video/subliminal/Manifest index 65421166b99f..17d545f18eea 100644 --- a/media-video/subliminal/Manifest +++ b/media-video/subliminal/Manifest @@ -5,6 +5,6 @@ DIST subliminal-2.0.5-r2.tar.gz 4442435 BLAKE2B ea2139bd61344d6a0cb4b48a2b75cbfd DIST subliminal-2.1.0.tar.gz 5480458 BLAKE2B 249bdd027d99dfb0b81d939af2dc08f62b52dca2c8618f1006ca76eee41c2443b450076eddc1aa533997beca8cdf9016b884d7eceeebbf4e48ced91dae1a2361 SHA512 9b26ae594895470830547eed604aa5b28b75f590e5be12c2d5a478c5daf798d405f209639bd54dce0565b0e27d1b0daa5bef87dfa8590af61f2ab1e287c41060 EBUILD subliminal-2.0.5-r2.ebuild 2178 BLAKE2B 59863aa347ee4be036ae707fefc8de0b4f29cf2210696a2ddea3dc76244134a3ff4747a21c5da99125b078715f908ff6eabce995f14fbfde3087568819c4d656 SHA512 089ad52eaece2c2a5b4e669481ecd7b1ddaefa96b839d0fba3e73c1aff9ab03dd89f42304b992bcd4909239dc64b2fb23917c7a6b3842ad9f80ee7a9dbe55840 EBUILD subliminal-2.0.5-r3.ebuild 2198 BLAKE2B cc26d4de0039cda500b6d21caa6583d7de6a5bd7c90444151244248166710f323e1fe224d859c64cc5377947b5b9228515f93c5f3bbf2d3ffb51f453367a1a8f SHA512 2f65f2053917a075aa4f3dd91bf5613d46c5422bdc518583ea08c32f30628315c8721afb8b875bd45af0e1fee4ec2c90cdcca9060d773aa04f0001a5cfbde386 -EBUILD subliminal-2.1.0.ebuild 2465 BLAKE2B c3f0a3933812b34e60e038f60aca169a82e837882ea7a34d69c4e15e6cd3dab445986c21b6eeac7b12dc886a32936564fbe5a71a693a8882f1e854a5b0c95bec SHA512 cf5a8f3d30d889f118ad717021c703ade1013a09c6f7bf26bc406b064f63d06e2263b27c2141f9d9065af7d2927be9492a4c0d0c42ddfaca7fb89ad29882657d -EBUILD subliminal-9999.ebuild 1964 BLAKE2B 357ca6c7cfd833293baa32fa9ef1eee1ef776df194b7dbd46712dd79b681e7652d053541c1f4f0151dfa085e90727427c55977f4f9af9a3cbf26597839345c27 SHA512 c3cdbee121bb2ff0f018732b5550688f1598942d7a95a4d5c0868223296ac126dd20cbea27c960d669b045a87875641b1a19da937cf5c0392ba73d31dacbc276 +EBUILD subliminal-2.1.0.ebuild 2742 BLAKE2B a69c41f8810aff9c34def02ac21576a29f277837fbed6c9e2d418b3ae47870a87ef83f7830f140458f6dc47cec144ecdf852b168bd81f01b0207eb55f6e9775e SHA512 35e79f688f05b84cd01bfef1fa2095f200a8ff6d345367c83eef530e699fa6e076934b51b178af2edc3c8122f363f6c75b160069189bbec58e6fc92c4ea73d9e +EBUILD subliminal-9999.ebuild 2719 BLAKE2B bc1135d128c01069313c58fb91e434468042d27f29fb70a1c2eac10b8416d21e2f9b73094143e1e721ce7873599d937924f4359c7292ea93bbfface88c520ecd SHA512 4a2dbf310039818a90cb12b9be5c67089ea1c11ebe82059798cf0fb9f98599475851a1651da8d2939b27fbbce5db17a296c258577b6af3718345b5c142abb5b5 MISC metadata.xml 539 BLAKE2B 024a8de9820963db06195cd86c53e3f641da2c8592cd493a05b3d30e223067a9222f69b3008d52d2fe37f487dde746fc1c0e6c84da3ed2b6d75e5d8a07bd6f49 SHA512 de6763fbbdddb92a57451ba85dc229f0564415d0f635f7a5ac74046529dbbe44b6c9a42f6d00b015ed06751d95b02163a21f7d029a3b36f6a520d29dabbe6a73 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 diff --git a/media-video/subliminal/subliminal-9999.ebuild b/media-video/subliminal/subliminal-9999.ebuild index 13b314d12fb2..54ade49d6223 100644 --- a/media-video/subliminal/subliminal-9999.ebuild +++ b/media-video/subliminal/subliminal-9999.ebuild @@ -3,20 +3,30 @@ EAPI=7 -PYTHON_COMPAT=( python3_6 ) +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 )" RDEPEND=" >=dev-python/appdirs-1.3[${PYTHON_USEDEP}] @@ -32,11 +42,10 @@ RDEPEND=" >=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}] " -DEPEND=" +BDEPEND=" test? ( app-arch/unzip dev-python/sympy[${PYTHON_USEDEP}] @@ -44,25 +53,47 @@ DEPEND=" ) " +PATCHES=( + "${FILESDIR}/${PN}-2.1.0-fix-pytest-warning.patch" +) + 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() { # 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 + 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() { + local skipped_tests=( + tests/test_core.py::test_scan_archive_with_one_video + tests/test_core.py::test_scan_archive_with_multiple_videos + tests/test_core.py::test_scan_archive_with_no_video + tests/test_core.py::test_scan_password_protected_archive + ) + + # Two tests that list providers rely on entry points + # so they need the package to be installed + distutils_install_for_testing + pytest -vv --ignore ${PN}/test/test_core.py ${skipped_tests[@]/#/--deselect } \ + || die "Tests fail with ${EPYTHON}" +} |