subliminal-2.0.5-r1.ebuild 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python{2_7,3_4,3_5} )
  5. PYTHON_REQ_USE='xml(+)'
  6. COMMIT_ID='dd74383d1cba82829ce720f2e439a65d13ffe7ef'
  7. inherit distutils-r1 vcs-snapshot
  8. DESCRIPTION="Python library to search and download subtitles"
  9. HOMEPAGE="https://github.com/Diaoul/subliminal https://pypi.python.org/pypi/subliminal"
  10. SRC_URI="
  11. https://github.com/Diaoul/${PN}/archive/${COMMIT_ID}.tar.gz -> ${PF}.tar.gz
  12. test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )
  13. "
  14. LICENSE="MIT"
  15. SLOT="0"
  16. KEYWORDS="amd64 x86"
  17. IUSE="test"
  18. RDEPEND="
  19. >=dev-python/guessit-2.0.1[${PYTHON_USEDEP}]
  20. >=dev-python/babelfish-0.5.2[${PYTHON_USEDEP}]
  21. >=dev-python/enzyme-0.4.1[${PYTHON_USEDEP}]
  22. >=dev-python/beautifulsoup-4.4.0:4[${PYTHON_USEDEP}]
  23. >=dev-python/requests-2.0[${PYTHON_USEDEP}]
  24. >=dev-python/click-4.0[${PYTHON_USEDEP}]
  25. >=dev-python/dogpile-cache-0.6.0[${PYTHON_USEDEP}]
  26. >=dev-python/stevedore-1.0.0[${PYTHON_USEDEP}]
  27. >=dev-python/chardet-2.3.0[${PYTHON_USEDEP}]
  28. >=dev-python/pysrt-1.0.1[${PYTHON_USEDEP}]
  29. >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
  30. >=dev-python/appdirs-1.3[${PYTHON_USEDEP}]
  31. >=dev-python/rarfile-2.7[compressed,${PYTHON_USEDEP}]
  32. >=dev-python/pytz-2012c[${PYTHON_USEDEP}]
  33. dev-python/setuptools[${PYTHON_USEDEP}]
  34. virtual/python-futures[${PYTHON_USEDEP}]
  35. "
  36. DEPEND="${RDEPEND}
  37. test? (
  38. app-arch/unzip
  39. >=dev-python/vcrpy-1.6.1[${PYTHON_USEDEP}]
  40. dev-python/pytest[${PYTHON_USEDEP}]
  41. dev-python/pytest-cov[${PYTHON_USEDEP}]
  42. dev-python/pytest-runner[${PYTHON_USEDEP}]
  43. dev-python/sympy[${PYTHON_USEDEP}]
  44. $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7)
  45. )
  46. "
  47. PATCHES=( "${FILESDIR}/${P}-add-missing-comma.patch" )
  48. S="${WORKDIR}/${PF}"
  49. python_prepare_all() {
  50. # Disable code checkers as they require unavailable dependencies.
  51. sed -i -e 's/--\(pep8\|flakes\)//g' pytest.ini || die
  52. sed -i -e "s/'pytest-\(pep8\|flakes\)',//g" setup.py || die
  53. # Disable unconditional dependency on dev-python/pytest-runner.
  54. sed -i -e "s|'pytest-runner'||g" setup.py || die
  55. if use test; then
  56. mkdir -p tests/data/mkv || die
  57. ln -s "${WORKDIR}"/test*.mkv tests/data/mkv/ || die
  58. fi
  59. distutils-r1_python_prepare_all
  60. }
  61. python_test() {
  62. esetup.py test
  63. }