python-mode-0.6.18-r3.ebuild 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. VIM_PLUGIN_MESSAGES="filetype"
  5. VIM_PLUGIN_HELPFILES="PythonModeCommands"
  6. VIM_PLUGIN_HELPURI="https://github.com/klen/python-mode"
  7. inherit vim-plugin eutils
  8. DESCRIPTION="Provide python code looking for bugs, refactoring and other useful things"
  9. HOMEPAGE="http://www.vim.org/scripts/script.php?script_id=3770 https://github.com/klen/python-mode"
  10. SRC_URI="https://github.com/klen/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
  11. LICENSE="LGPL-3"
  12. KEYWORDS="amd64 x86"
  13. RDEPEND="
  14. dev-python/astng
  15. dev-python/autopep8
  16. dev-python/pyflakes
  17. dev-python/pylint
  18. dev-python/rope
  19. dev-python/ropemode
  20. "
  21. src_prepare() {
  22. epatch "${FILESDIR}"/${P}-dont-add-cwd-to-syspath.patch
  23. # debundling fun
  24. rm -rf pylibs/pylama/{pep8.py,pyflakes} pylibs/{autopep8.py}
  25. #rm -rf pylibs/{rope,ropemode} #475686
  26. sed -e 's/from .pep8/from pep8/g' \
  27. -e 's/from .pyflakes/from pyflakes/g' \
  28. -i pylibs/pylama/utils.py || die
  29. # there's still pylint left, I failed to debundle it :/
  30. mv pylint.ini "${T}" || die
  31. sed -e "s|expand(\"<sfile>:p:h:h\")|\"${EPREFIX}/usr/share/${PN}\"|" \
  32. -i autoload/pymode.vim || die # use custom path
  33. }
  34. src_install() {
  35. vim-plugin_src_install
  36. insinto usr/share/${PN}
  37. doins "${T}"/pylint.ini
  38. }
  39. pkg_postinst() {
  40. vim-plugin_pkg_postinst
  41. einfo "If you use custom pylintrc make sure you append the contents of"
  42. einfo " ${EPREFIX}/usr/share/${PN}/pylint.ini"
  43. einfo "to it. Otherwise PyLint command will not work properly."
  44. }