1 |
commit: bab7113a6852ac300bee085aee8eb24a231dd482 |
2 |
Author: Maciej Barć <xgqt <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Apr 8 13:59:14 2022 +0000 |
4 |
Commit: Maciej Barć <xgqt <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Apr 8 14:00:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bab7113a |
7 |
|
8 |
app-emacs/elpy: new package; add version 1.35.0_p20220321 |
9 |
|
10 |
2022.03.21 snapshot |
11 |
|
12 |
Signed-off-by: Maciej Barć <xgqt <AT> gentoo.org> |
13 |
|
14 |
app-emacs/elpy/Manifest | 1 + |
15 |
app-emacs/elpy/elpy-1.35.0_p20220321.ebuild | 86 ++++++++++++++++++++++ |
16 |
app-emacs/elpy/files/50elpy-gentoo.el | 5 ++ |
17 |
.../elpy-elpy-rpc.el-elpy-rpc-pythonpath.patch | 12 +++ |
18 |
.../elpy/files/elpy-elpy.el-yas-snippet-dirs.patch | 14 ++++ |
19 |
app-emacs/elpy/metadata.xml | 13 ++++ |
20 |
6 files changed, 131 insertions(+) |
21 |
|
22 |
diff --git a/app-emacs/elpy/Manifest b/app-emacs/elpy/Manifest |
23 |
new file mode 100644 |
24 |
index 000000000000..281c4c88caff |
25 |
--- /dev/null |
26 |
+++ b/app-emacs/elpy/Manifest |
27 |
@@ -0,0 +1 @@ |
28 |
+DIST elpy-1.35.0_p20220321.tar.gz 177145 BLAKE2B 6362a68efc5997c3d0e26e22c6fe563e1fdba5e6f3a9e1e3c1b53bef8320cc4ac0f929edd177b492a5f2e622c265aeb23d34df8db8ae67bd9a2e48e00adc7c25 SHA512 e8cf579effa0a0bc8f3c05001341b96fd134f8f08c16d95d83200ad94a942e3f60ef4ee4186758a2810de2ca58ee41e7119bc84a7535f28665ec7dad29b07db0 |
29 |
|
30 |
diff --git a/app-emacs/elpy/elpy-1.35.0_p20220321.ebuild b/app-emacs/elpy/elpy-1.35.0_p20220321.ebuild |
31 |
new file mode 100644 |
32 |
index 000000000000..a74075d632d7 |
33 |
--- /dev/null |
34 |
+++ b/app-emacs/elpy/elpy-1.35.0_p20220321.ebuild |
35 |
@@ -0,0 +1,86 @@ |
36 |
+# Copyright 1999-2022 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=8 |
40 |
+ |
41 |
+H=1746e7009000b7635c0ea6f1559018143aa61642 |
42 |
+ |
43 |
+DISTUTILS_SINGLE_IMPL=ON |
44 |
+DISTUTILS_USE_PEP517=setuptools |
45 |
+PYTHON_COMPAT=( python3_{8..10} ) |
46 |
+ |
47 |
+NEED_EMACS=24.4 |
48 |
+ |
49 |
+inherit distutils-r1 elisp |
50 |
+ |
51 |
+DESCRIPTION="Emacs Python Development Environment" |
52 |
+HOMEPAGE="https://github.com/jorgenschaefer/elpy/" |
53 |
+SRC_URI="https://github.com/jorgenschaefer/${PN}/archive/${H}.tar.gz |
54 |
+ -> ${P}.tar.gz" |
55 |
+S="${WORKDIR}"/${PN}-${H} |
56 |
+ |
57 |
+LICENSE="GPL-3+" |
58 |
+SLOT="0" |
59 |
+KEYWORDS="~amd64 ~x86" |
60 |
+IUSE="test" |
61 |
+RESTRICT="!test? ( test )" |
62 |
+ |
63 |
+RDEPEND=" |
64 |
+ app-emacs/company-mode |
65 |
+ app-emacs/highlight-indentation |
66 |
+ app-emacs/pyvenv |
67 |
+ app-emacs/s |
68 |
+ app-emacs/yasnippet |
69 |
+ $(python_gen_cond_dep 'dev-python/flake8[${PYTHON_USEDEP}]') |
70 |
+" |
71 |
+BDEPEND=" |
72 |
+ ${RDEPEND} |
73 |
+ test? ( |
74 |
+ $(python_gen_cond_dep ' |
75 |
+ dev-python/autopep8[${PYTHON_USEDEP}] |
76 |
+ dev-python/jedi[${PYTHON_USEDEP}] |
77 |
+ dev-python/yapf[${PYTHON_USEDEP}] |
78 |
+ ') |
79 |
+ ) |
80 |
+" |
81 |
+ |
82 |
+DOCS=( CONTRIBUTING.rst README.rst ) |
83 |
+PATCHES=( |
84 |
+ "${FILESDIR}"/${PN}-elpy.el-yas-snippet-dirs.patch |
85 |
+ "${FILESDIR}"/${PN}-elpy-rpc.el-elpy-rpc-pythonpath.patch |
86 |
+) |
87 |
+SITEFILE="50${PN}-gentoo.el" |
88 |
+ |
89 |
+distutils_enable_sphinx docs --no-autodoc |
90 |
+distutils_enable_tests unittest |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ elisp_pkg_setup |
94 |
+ python-single-r1_pkg_setup |
95 |
+} |
96 |
+ |
97 |
+src_prepare() { |
98 |
+ distutils-r1_src_prepare |
99 |
+ rm elpy/tests/test_black.py || die |
100 |
+ |
101 |
+ sed -i "s|@SITEETC@|${EPREFIX}${SITEETC}/${PN}|" ${PN}.el || die |
102 |
+ sed -i "s|@PYTHONLIB@|${EPREFIX}/usr/lib/${EPYTHON}|" ${PN}-rpc.el || die |
103 |
+} |
104 |
+ |
105 |
+src_compile() { |
106 |
+ distutils-r1_src_compile |
107 |
+ elisp_src_compile |
108 |
+} |
109 |
+ |
110 |
+src_test() { |
111 |
+ distutils-r1_src_test |
112 |
+} |
113 |
+ |
114 |
+src_install() { |
115 |
+ mkdir -p "${S}_${EPYTHON}"/install/usr/lib/python-exec/${EPYTHON} || die |
116 |
+ distutils-r1_src_install |
117 |
+ |
118 |
+ elisp_src_install |
119 |
+ insinto ${SITEETC}/${PN} |
120 |
+ doins -r snippets |
121 |
+} |
122 |
|
123 |
diff --git a/app-emacs/elpy/files/50elpy-gentoo.el b/app-emacs/elpy/files/50elpy-gentoo.el |
124 |
new file mode 100644 |
125 |
index 000000000000..2e45a60a76a8 |
126 |
--- /dev/null |
127 |
+++ b/app-emacs/elpy/files/50elpy-gentoo.el |
128 |
@@ -0,0 +1,5 @@ |
129 |
+(add-to-list 'load-path "@SITELISP@") |
130 |
+(autoload 'elpy-enable "elpy" |
131 |
+ "Enable Elpy in all future Python buffers." t) |
132 |
+(autoload 'elpy-mode "elpy" |
133 |
+ "Minor mode in Python buffers for the Emacs Lisp Python Environment." t) |
134 |
|
135 |
diff --git a/app-emacs/elpy/files/elpy-elpy-rpc.el-elpy-rpc-pythonpath.patch b/app-emacs/elpy/files/elpy-elpy-rpc.el-elpy-rpc-pythonpath.patch |
136 |
new file mode 100644 |
137 |
index 000000000000..f64dfd3f563e |
138 |
--- /dev/null |
139 |
+++ b/app-emacs/elpy/files/elpy-elpy-rpc.el-elpy-rpc-pythonpath.patch |
140 |
@@ -0,0 +1,12 @@ |
141 |
+index b228597..aa5fd12 100644 |
142 |
+--- a/elpy-rpc.el |
143 |
++++ b/elpy-rpc.el |
144 |
+@@ -100,7 +100,7 @@ for example), set this to the full interpreter path." |
145 |
+ (elpy-rpc-restart))) |
146 |
+ :group 'elpy) |
147 |
+ |
148 |
+-(defcustom elpy-rpc-pythonpath (file-name-directory load-file-name) |
149 |
++(defcustom elpy-rpc-pythonpath "@PYTHONLIB@/site-packages/" |
150 |
+ "A directory to add to the PYTHONPATH for the RPC process. |
151 |
+ |
152 |
+ This should be a directory where the elpy module can be found. If |
153 |
|
154 |
diff --git a/app-emacs/elpy/files/elpy-elpy.el-yas-snippet-dirs.patch b/app-emacs/elpy/files/elpy-elpy.el-yas-snippet-dirs.patch |
155 |
new file mode 100644 |
156 |
index 000000000000..d38b320488cd |
157 |
--- /dev/null |
158 |
+++ b/app-emacs/elpy/files/elpy-elpy.el-yas-snippet-dirs.patch |
159 |
@@ -0,0 +1,14 @@ |
160 |
+diff --git a/elpy.el b/elpy.el |
161 |
+index f2a24a1..7a9b464 100644 |
162 |
+--- a/elpy.el |
163 |
++++ b/elpy.el |
164 |
+@@ -2022,8 +3777,7 @@ If a region is selected, fold that region." |
165 |
+ (unless (listp yas-snippet-dirs) |
166 |
+ (setq yas-snippet-dirs (list yas-snippet-dirs))) |
167 |
+ (add-to-list 'yas-snippet-dirs |
168 |
+- (concat (file-name-directory (locate-library "elpy")) |
169 |
+- "snippets/") |
170 |
++ "@SITEETC@/snippets" |
171 |
+ t) |
172 |
+ |
173 |
+ ;; Now load yasnippets. |
174 |
|
175 |
diff --git a/app-emacs/elpy/metadata.xml b/app-emacs/elpy/metadata.xml |
176 |
new file mode 100644 |
177 |
index 000000000000..231ce3b419da |
178 |
--- /dev/null |
179 |
+++ b/app-emacs/elpy/metadata.xml |
180 |
@@ -0,0 +1,13 @@ |
181 |
+<?xml version="1.0" encoding="UTF-8"?> |
182 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
183 |
+ |
184 |
+<pkgmetadata> |
185 |
+ <maintainer type="project"> |
186 |
+ <email>gnu-emacs@g.o</email> |
187 |
+ <name>Gentoo GNU Emacs project</name> |
188 |
+ </maintainer> |
189 |
+ <upstream> |
190 |
+ <bugs-to>https://github.com/jorgenschaefer/elpy/issues/</bugs-to> |
191 |
+ <remote-id type="github">jorgenschaefer/elpy</remote-id> |
192 |
+ </upstream> |
193 |
+</pkgmetadata> |