1 |
commit: b82a469c7cacd58d40b4d934d49c0d7316525ebe |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 21 16:29:16 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 27 15:19:20 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b82a469c |
7 |
|
8 |
app-vim/python-mode: Port to python-single-r1 |
9 |
|
10 |
app-vim/python-mode/python-mode-0.6.18-r4.ebuild | 62 ++++++++++++++++++++++++ |
11 |
1 file changed, 62 insertions(+) |
12 |
|
13 |
diff --git a/app-vim/python-mode/python-mode-0.6.18-r4.ebuild b/app-vim/python-mode/python-mode-0.6.18-r4.ebuild |
14 |
new file mode 100644 |
15 |
index 00000000000..e8f195d59fa |
16 |
--- /dev/null |
17 |
+++ b/app-vim/python-mode/python-mode-0.6.18-r4.ebuild |
18 |
@@ -0,0 +1,62 @@ |
19 |
+# Copyright 1999-2017 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+ |
22 |
+EAPI=6 |
23 |
+ |
24 |
+VIM_PLUGIN_MESSAGES="filetype" |
25 |
+VIM_PLUGIN_HELPFILES="PythonModeCommands" |
26 |
+VIM_PLUGIN_HELPURI="https://github.com/klen/python-mode" |
27 |
+ |
28 |
+PYTHON_COMPAT=( python2_7 ) |
29 |
+ |
30 |
+inherit python-single-r1 vim-plugin |
31 |
+ |
32 |
+DESCRIPTION="Provide python code looking for bugs, refactoring and other useful things" |
33 |
+HOMEPAGE="http://www.vim.org/scripts/script.php?script_id=3770 https://github.com/klen/python-mode" |
34 |
+SRC_URI="https://github.com/klen/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="LGPL-3" |
37 |
+KEYWORDS="~amd64 ~x86" |
38 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
39 |
+ |
40 |
+RDEPEND="${PYTHON_DEPS} |
41 |
+ || ( |
42 |
+ app-editors/vim[python,${PYTHON_USEDEP}] |
43 |
+ app-editors/gvim[python,${PYTHON_USEDEP}] |
44 |
+ ) |
45 |
+ dev-python/astng[${PYTHON_USEDEP}] |
46 |
+ dev-python/autopep8[${PYTHON_USEDEP}] |
47 |
+ dev-python/pyflakes[${PYTHON_USEDEP}] |
48 |
+ dev-python/pylint[${PYTHON_USEDEP}] |
49 |
+ dev-python/rope[${PYTHON_USEDEP}] |
50 |
+ dev-python/ropemode[${PYTHON_USEDEP}]" |
51 |
+ |
52 |
+src_prepare() { |
53 |
+ eapply "${FILESDIR}"/${P}-dont-add-cwd-to-syspath.patch |
54 |
+ eapply_user |
55 |
+ |
56 |
+ # debundling fun |
57 |
+ rm -rf pylibs/pylama/{pep8.py,pyflakes} pylibs/{autopep8.py} |
58 |
+ #rm -rf pylibs/{rope,ropemode} #475686 |
59 |
+ sed -e 's/from .pep8/from pep8/g' \ |
60 |
+ -e 's/from .pyflakes/from pyflakes/g' \ |
61 |
+ -i pylibs/pylama/utils.py || die |
62 |
+ # there's still pylint left, I failed to debundle it :/ |
63 |
+ |
64 |
+ mv pylint.ini "${T}" || die |
65 |
+ sed -e "s|expand(\"<sfile>:p:h:h\")|\"${EPREFIX}/usr/share/${PN}\"|" \ |
66 |
+ -i autoload/pymode.vim || die # use custom path |
67 |
+} |
68 |
+ |
69 |
+src_install() { |
70 |
+ vim-plugin_src_install |
71 |
+ insinto usr/share/${PN} |
72 |
+ doins "${T}"/pylint.ini |
73 |
+} |
74 |
+ |
75 |
+pkg_postinst() { |
76 |
+ vim-plugin_pkg_postinst |
77 |
+ einfo "If you use custom pylintrc make sure you append the contents of" |
78 |
+ einfo " ${EPREFIX}/usr/share/${PN}/pylint.ini" |
79 |
+ einfo "to it. Otherwise PyLint command will not work properly." |
80 |
+} |