diff options
author | Ilya Tumaykin <itumaykin@gmail.com> | 2016-05-11 08:05:29 +0300 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2016-05-12 19:39:36 +0800 |
commit | 6b3aa8230f88ab75fbf816974326ac7a7a7b6ca3 (patch) | |
tree | 487a1662617a838efcd13a238868cd865c9154b4 /dev-python/guessit | |
parent | dev-python/guessit: remove old (diff) | |
download | gentoo-6b3aa8230f88ab75fbf816974326ac7a7a7b6ca3.tar.gz gentoo-6b3aa8230f88ab75fbf816974326ac7a7a7b6ca3.tar.bz2 gentoo-6b3aa8230f88ab75fbf816974326ac7a7a7b6ca3.zip |
dev-python/guessit: verbump to 2.0.5
It's a complete rewrite since 1.x thus drop untested implementations
from PYTHON_COMPAT.
Sync 9999 ebuild with 2.0.5.
Package-Manager: portage-2.2.28
Signed-off-by: Ian Delaney <idella4@gentoo.org>
Diffstat (limited to 'dev-python/guessit')
-rw-r--r-- | dev-python/guessit/Manifest | 1 | ||||
-rw-r--r-- | dev-python/guessit/files/guessit-2.0.5-support-noninteractive-shells.patch | 22 | ||||
-rw-r--r-- | dev-python/guessit/guessit-2.0.5.ebuild | 53 | ||||
-rw-r--r-- | dev-python/guessit/guessit-9999.ebuild | 42 |
4 files changed, 102 insertions, 16 deletions
diff --git a/dev-python/guessit/Manifest b/dev-python/guessit/Manifest index fe1ab144994f..fcec1cd4f52f 100644 --- a/dev-python/guessit/Manifest +++ b/dev-python/guessit/Manifest @@ -1 +1,2 @@ DIST guessit-1.0.3.tar.gz 1200782 SHA256 6de9149b663b415ebc1f4ab9f12eb624ca859cf13cc1a491382f56619f33f59b SHA512 be427d3ac5b598fe14b26b4fa41c3bd9c0cc946df85381c61be9180275b54f6beac9d433ba781f4351bf94eba5a53b1097d8503268efd9019d50beb60f92cfcb WHIRLPOOL 31b2bb0e57a395f38f7ebe2420945cf00e00149a8345db245c3978cebb6366b53b8b1eae89838d4729e1e8c15abef2f4c8c91f64e5eb3e6f36a56f54de715546 +DIST guessit-2.0.5.tar.gz 74464 SHA256 626e0024c5cca9b84883b65246e4f238e3f39064664486f69f086c853a63ff61 SHA512 6d02df5caebc0373ea0609b2ef4fa0b2ca2bedce62f5df3f1bdcf84808c09aff57f1c043704effedfb3ca4dbd4235f5a84c5580b1f2839f79933b40342309d2a WHIRLPOOL da5da3ac6a27f96714683acafe9664c316c522290cdd01308097c42fd55e8df16f735e54938c1e8b7b3c2531426d00b60c5361aedd8da8eea597fdc27a22b858 diff --git a/dev-python/guessit/files/guessit-2.0.5-support-noninteractive-shells.patch b/dev-python/guessit/files/guessit-2.0.5-support-noninteractive-shells.patch new file mode 100644 index 000000000000..e0678d105363 --- /dev/null +++ b/dev-python/guessit/files/guessit-2.0.5-support-noninteractive-shells.patch @@ -0,0 +1,22 @@ +commit e43ef015ae88c43fa39274a23515adbe22ba2b2a +Author: Ilya Tumaykin <itumaykin@gmail.com> +Date: Tue May 10 08:06:13 2016 +0300 + +options: fix StrOptType for non-interactive shells on Python 2 + +Closes: https://github.com/guessit-io/guessit/issues/293 +--- + +diff --git a/guessit/options.py b/guessit/options.py +index 3d60ef9..41ba143 100644 +--- a/guessit/options.py ++++ b/guessit/options.py +@@ -11,7 +11,7 @@ import six + + + if six.PY2: +- StrOptType = lambda s: unicode(s, sys.stdin.encoding) # pylint:disable=undefined-variable ++ StrOptType = lambda s: unicode(s, sys.stdin.encoding) if sys.stdin.isatty() else unicode(s, 'UTF-8') # pylint:disable=undefined-variable + else: + StrOptType = str # pylint:disable=redefined-variable-type + diff --git a/dev-python/guessit/guessit-2.0.5.ebuild b/dev-python/guessit/guessit-2.0.5.ebuild new file mode 100644 index 000000000000..cbe9608dac7d --- /dev/null +++ b/dev-python/guessit/guessit-2.0.5.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4} ) + +inherit distutils-r1 + +DESCRIPTION="Python library for guessing information from video filenames" +HOMEPAGE="https://github.com/guessit-io/guessit https://pypi.python.org/pypi/guessit" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +RDEPEND=" + >=dev-python/rebulk-0.7.1[${PYTHON_USEDEP}] + >=dev-python/babelfish-0.5.5[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}] + <dev-python/python-dateutil-2.5.2[${PYTHON_USEDEP}] + dev-python/stevedore[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] +" +DEPEND="${RDEPEND} + test? ( + >=dev-python/pytest-2.7.3[${PYTHON_USEDEP}] + dev-python/pytest-capturelog[${PYTHON_USEDEP}] + dev-python/pytest-runner[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + ) +" + +PATCHES=( "${FILESDIR}/${P}-support-noninteractive-shells.patch" ) + +python_prepare_all() { + # Disable benchmarks as they require unavailable pytest-benchmark. + rm guessit/test/test_benchmark.py || die + sed -i -e "s|'pytest-benchmark',||g" setup.py || die + + # Disable unconditional dependency on dev-python/pytest-runner. + sed -i -e "s|'pytest-runner'||g" setup.py || die + + distutils-r1_python_prepare_all +} + +python_test() { + esetup.py test +} diff --git a/dev-python/guessit/guessit-9999.ebuild b/dev-python/guessit/guessit-9999.ebuild index 83f23cb50d4e..0eed9f6cf8cc 100644 --- a/dev-python/guessit/guessit-9999.ebuild +++ b/dev-python/guessit/guessit-9999.ebuild @@ -2,42 +2,52 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="5" -PYTHON_COMPAT=( python{2_7,3_3,3_4} ) +EAPI=6 -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="https://github.com/wackou/guessit.git" - inherit git-r3 -else - SRC_URI="https://github.com/wackou/guessit/archive/${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~x86" -fi +PYTHON_COMPAT=( python{2_7,3_4} ) -inherit distutils-r1 +inherit distutils-r1 git-r3 -DESCRIPTION="library for guessing information from video files" -HOMEPAGE="http://guessit.readthedocs.org https://github.com/wackou/guessit https://pypi.python.org/pypi/guessit" +DESCRIPTION="Python library for guessing information from video filenames" +HOMEPAGE="https://github.com/guessit-io/guessit https://pypi.python.org/pypi/guessit" +EGIT_REPO_URI="git://github.com/${PN}-io/${PN}.git" LICENSE="LGPL-3" SLOT="0" +KEYWORDS="" IUSE="test" RDEPEND=" + >=dev-python/rebulk-0.7.1[${PYTHON_USEDEP}] >=dev-python/babelfish-0.5.5[${PYTHON_USEDEP}] - >=dev-python/stevedore-0.14[${PYTHON_USEDEP}] - dev-python/requests[${PYTHON_USEDEP}] >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}] + <dev-python/python-dateutil-2.5.2[${PYTHON_USEDEP}] + dev-python/stevedore[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/six[${PYTHON_USEDEP}] " DEPEND="${RDEPEND} test? ( >=dev-python/pytest-2.7.3[${PYTHON_USEDEP}] dev-python/pytest-capturelog[${PYTHON_USEDEP}] + dev-python/pytest-runner[${PYTHON_USEDEP}] dev-python/pyyaml[${PYTHON_USEDEP}] ) - dev-python/pytest-runner[${PYTHON_USEDEP}] - dev-python/setuptools[${PYTHON_USEDEP}] " +PATCHES=( "${FILESDIR}/${PN}-2.0.5-support-noninteractive-shells.patch" ) + +python_prepare_all() { + # Disable benchmarks as they require unavailable pytest-benchmark. + rm guessit/test/test_benchmark.py || die + sed -i -e "s|'pytest-benchmark',||g" setup.py || die + + # Disable unconditional dependency on dev-python/pytest-runner. + sed -i -e "s|'pytest-runner'||g" setup.py || die + + distutils-r1_python_prepare_all +} + python_test() { esetup.py test } |