retext-7.0.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python3_{4,5} )
  5. PLOCALES="ca cs cy da de es et eu fr hu it ja pl pt pt_BR ru sk sr sr@latin uk zh_TW"
  6. inherit distutils-r1 l10n eutils
  7. MY_PN="ReText"
  8. MY_P="${MY_PN}-${PV/_/~}"
  9. DESCRIPTION="Simple editor for Markdown and reStructuredText"
  10. HOMEPAGE="https://github.com/retext-project/retext https://github.com/retext-project/retext/wiki"
  11. SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
  12. LICENSE="GPL-2"
  13. SLOT="0"
  14. KEYWORDS="~amd64 ~x86"
  15. IUSE="+spell"
  16. RDEPEND="
  17. dev-python/docutils[${PYTHON_USEDEP}]
  18. dev-python/markdown[${PYTHON_USEDEP}]
  19. >=dev-python/markups-2.0[${PYTHON_USEDEP}]
  20. >=dev-python/chardet-2.3[${PYTHON_USEDEP}]
  21. dev-python/pygments[${PYTHON_USEDEP}]
  22. dev-python/PyQt5[gui,network,printsupport,webkit,widgets,${PYTHON_USEDEP}]
  23. spell? ( dev-python/pyenchant[${PYTHON_USEDEP}] )
  24. "
  25. S="${WORKDIR}"/${MY_P}
  26. remove_locale() {
  27. find "${ED}" -name "retext_${1}.qm" -delete || die "Failed to remove locale ${1}."
  28. }
  29. python_test() {
  30. esetup.py test
  31. }
  32. python_install_all() {
  33. distutils-r1_python_install_all
  34. newicon {icons/,}${PN}.png
  35. newicon {icons/,}${PN}.svg
  36. l10n_for_each_disabled_locale_do remove_locale
  37. make_desktop_entry ${PN} "${MY_PN} Editor" ${PN} "Development;Utility;TextEditor"
  38. }