pynvim-0.5.2.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2024 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. DISTUTILS_USE_PEP517=setuptools
  5. PYTHON_COMPAT=( python3_{10..13} pypy3 )
  6. inherit distutils-r1
  7. DESCRIPTION="Python client for Neovim"
  8. HOMEPAGE="
  9. https://github.com/neovim/pynvim/
  10. https://pypi.org/project/pynvim/
  11. "
  12. SRC_URI="
  13. https://github.com/neovim/${PN}/archive/${COMMIT_HASH}.tar.gz
  14. -> ${P}.gh.tar.gz
  15. "
  16. LICENSE="Apache-2.0"
  17. SLOT="0"
  18. KEYWORDS="~amd64 ~arm ~arm64 ~x86"
  19. RDEPEND="
  20. >=dev-python/msgpack-0.5.0[${PYTHON_USEDEP}]
  21. $(python_gen_cond_dep '
  22. >=dev-python/greenlet-3.0[${PYTHON_USEDEP}]
  23. ' 'python*')
  24. $(python_gen_cond_dep '
  25. >=dev-python/typing-extensions-4.5[${PYTHON_USEDEP}]
  26. ' 3.11 3.12)
  27. "
  28. BDEPEND="
  29. test? (
  30. app-editors/neovim
  31. dev-python/pytest-timeout[${PYTHON_USEDEP}]
  32. )
  33. "
  34. RESTRICT="mirror"
  35. : ${EPYTEST_TIMEOUT:=5}
  36. distutils_enable_tests pytest
  37. python_test() {
  38. local EPYTEST_DESELECT=(
  39. # hangs
  40. test/test_events.py::test_broadcast
  41. )
  42. local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
  43. epytest
  44. }
  45. python_prepare_all() {
  46. sed -e "s/msgpack-python/msgpack/g" -i setup.py || die
  47. sed -re "s:[\"']pytest-runner[\"'](,|)::" -i setup.py || die
  48. distutils-r1_python_prepare_all
  49. }