Gentoo Archives: gentoo-commits

From: Sebastian Pipping <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/
Date: Sat, 02 Jan 2021 12:57:25
Message-Id: 1609592078.3b448598f3ea1b77f020e6a37b14962938958698.sping@gentoo
1 commit: 3b448598f3ea1b77f020e6a37b14962938958698
2 Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 2 12:54:38 2021 +0000
4 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 2 12:54:38 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b448598
7
8 dev-python/ipython: Prevent use with dev-python/jedi-0.18.0
9
10 Closes: https://bugs.gentoo.org/762703
11 Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>
12 Package-Manager: Portage-3.0.12, Repoman-3.0.2
13
14 dev-python/ipython/ipython-7.16.1-r1.ebuild | 135 +++++++++++++++++++++++++++
15 dev-python/ipython/ipython-7.19.0-r1.ebuild | 136 ++++++++++++++++++++++++++++
16 2 files changed, 271 insertions(+)
17
18 diff --git a/dev-python/ipython/ipython-7.16.1-r1.ebuild b/dev-python/ipython/ipython-7.16.1-r1.ebuild
19 new file mode 100644
20 index 00000000000..15ab6164e4e
21 --- /dev/null
22 +++ b/dev-python/ipython/ipython-7.16.1-r1.ebuild
23 @@ -0,0 +1,135 @@
24 +# Copyright 1999-2021 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=7
28 +
29 +PYTHON_COMPAT=( python3_{6..9} )
30 +PYTHON_REQ_USE='readline,sqlite,threads(+)'
31 +
32 +inherit distutils-r1 optfeature virtualx
33 +
34 +DESCRIPTION="Advanced interactive shell for Python"
35 +HOMEPAGE="https://ipython.org/ https://github.com/ipython/ipython/"
36 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
37 +
38 +LICENSE="BSD"
39 +SLOT="0"
40 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
41 +IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
42 +RESTRICT="!test? ( test )"
43 +
44 +CDEPEND="
45 + dev-python/backcall[${PYTHON_USEDEP}]
46 + dev-python/decorator[${PYTHON_USEDEP}]
47 + <dev-python/jedi-0.18[${PYTHON_USEDEP}]
48 + dev-python/pexpect[${PYTHON_USEDEP}]
49 + dev-python/pickleshare[${PYTHON_USEDEP}]
50 + >=dev-python/prompt_toolkit-2[${PYTHON_USEDEP}]
51 + <dev-python/prompt_toolkit-3.1[${PYTHON_USEDEP}]
52 + dev-python/pygments[${PYTHON_USEDEP}]
53 + dev-python/traitlets[${PYTHON_USEDEP}]
54 + matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
55 +"
56 +
57 +RDEPEND="${CDEPEND}
58 + nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
59 +
60 +DEPEND="${CDEPEND}
61 + dev-python/setuptools[${PYTHON_USEDEP}]
62 + test? (
63 + app-text/dvipng[truetype]
64 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
65 + dev-python/nbformat[${PYTHON_USEDEP}]
66 + dev-python/nose[${PYTHON_USEDEP}]
67 + >=dev-python/numpy-1.14[${PYTHON_USEDEP}]
68 + dev-python/requests[${PYTHON_USEDEP}]
69 + dev-python/testpath[${PYTHON_USEDEP}]
70 + )
71 + doc? (
72 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
73 + dev-python/matplotlib[${PYTHON_USEDEP}]
74 + >=dev-python/sphinx-2[${PYTHON_USEDEP}]
75 + )"
76 +
77 +PDEPEND="
78 + notebook? (
79 + dev-python/notebook[${PYTHON_USEDEP}]
80 + dev-python/ipywidgets[${PYTHON_USEDEP}]
81 + dev-python/widgetsnbextension[${PYTHON_USEDEP}]
82 + )
83 + qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
84 + smp? (
85 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
86 + >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
87 + )"
88 +
89 +PATCHES=( "${FILESDIR}"/2.1.0-substitute-files.patch )
90 +
91 +DISTUTILS_IN_SOURCE_BUILD=1
92 +
93 +python_prepare_all() {
94 + # Remove out of date insource files
95 + rm IPython/extensions/cythonmagic.py || die
96 + rm IPython/extensions/rmagic.py || die
97 +
98 + # Prevent un-needed download during build
99 + if use doc; then
100 + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
101 + fi
102 +
103 + distutils-r1_python_prepare_all
104 +}
105 +
106 +python_compile_all() {
107 + if use doc; then
108 + emake -C docs html_noapi
109 + HTML_DOCS=( docs/build/html/. )
110 + fi
111 +}
112 +
113 +src_test() {
114 + virtx distutils-r1_src_test
115 +}
116 +
117 +python_test() {
118 + distutils_install_for_testing
119 + pushd "${TEST_DIR}" >/dev/null || die
120 + "${TEST_DIR}"/scripts/iptest || die
121 + popd >/dev/null || die
122 +}
123 +
124 +python_install() {
125 + distutils-r1_python_install
126 +
127 + # Create ipythonX.Y symlinks.
128 + # TODO:
129 + # 1. do we want them for pypy? No. pypy has no numpy
130 + # 2. handle it in the eclass instead (use _python_ln_rel).
131 + # With pypy not an option the dosym becomes unconditional
132 + dosym ../lib/python-exec/${EPYTHON}/ipython \
133 + /usr/bin/ipython${EPYTHON#python}
134 +}
135 +
136 +python_install_all() {
137 + distutils-r1_python_install_all
138 +
139 + if use examples; then
140 + dodoc -r examples
141 + docompress -x /usr/share/doc/${PF}/examples
142 + fi
143 +}
144 +
145 +pkg_postinst() {
146 + optfeature "sympyprinting" dev-python/sympy
147 + optfeature "cythonmagic" dev-python/cython
148 + optfeature "%lprun magic command" dev-python/line_profiler
149 + optfeature "%mprun magic command" dev-python/memory_profiler
150 +
151 + if use nbconvert; then
152 + if ! has_version app-text/pandoc ; then
153 + einfo "Node.js will be used to convert notebooks to other formats"
154 + einfo "like HTML. Support for that is still experimental. If you"
155 + einfo "encounter any problems, please use app-text/pandoc instead."
156 + fi
157 + fi
158 +}
159
160 diff --git a/dev-python/ipython/ipython-7.19.0-r1.ebuild b/dev-python/ipython/ipython-7.19.0-r1.ebuild
161 new file mode 100644
162 index 00000000000..9cf2d7af922
163 --- /dev/null
164 +++ b/dev-python/ipython/ipython-7.19.0-r1.ebuild
165 @@ -0,0 +1,136 @@
166 +# Copyright 1999-2021 Gentoo Authors
167 +# Distributed under the terms of the GNU General Public License v2
168 +
169 +EAPI=7
170 +
171 +DISTUTILS_USE_SETUPTOOLS=no
172 +PYTHON_COMPAT=( python3_{7..9} )
173 +PYTHON_REQ_USE='readline,sqlite,threads(+)'
174 +
175 +inherit distutils-r1 optfeature virtualx
176 +
177 +DESCRIPTION="Advanced interactive shell for Python"
178 +HOMEPAGE="https://ipython.org/ https://github.com/ipython/ipython/"
179 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
180 +
181 +LICENSE="BSD"
182 +SLOT="0"
183 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
184 +IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
185 +RESTRICT="!test? ( test )"
186 +
187 +CDEPEND="
188 + dev-python/backcall[${PYTHON_USEDEP}]
189 + dev-python/decorator[${PYTHON_USEDEP}]
190 + <dev-python/jedi-0.18[${PYTHON_USEDEP}]
191 + >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
192 + dev-python/pickleshare[${PYTHON_USEDEP}]
193 + >=dev-python/prompt_toolkit-2[${PYTHON_USEDEP}]
194 + <dev-python/prompt_toolkit-3.1[${PYTHON_USEDEP}]
195 + dev-python/pygments[${PYTHON_USEDEP}]
196 + dev-python/traitlets[${PYTHON_USEDEP}]
197 + matplotlib? ( dev-python/matplotlib[${PYTHON_USEDEP}] )
198 +"
199 +
200 +RDEPEND="${CDEPEND}
201 + nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
202 +
203 +BDEPEND="
204 + test? (
205 + ${CDEPEND}
206 + app-text/dvipng[truetype]
207 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
208 + dev-python/nbformat[${PYTHON_USEDEP}]
209 + dev-python/nose[${PYTHON_USEDEP}]
210 + >=dev-python/numpy-1.14[${PYTHON_USEDEP}]
211 + dev-python/requests[${PYTHON_USEDEP}]
212 + dev-python/testpath[${PYTHON_USEDEP}]
213 + )
214 + doc? (
215 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
216 + dev-python/matplotlib[${PYTHON_USEDEP}]
217 + >=dev-python/sphinx-2[${PYTHON_USEDEP}]
218 + )"
219 +
220 +PDEPEND="
221 + notebook? (
222 + dev-python/notebook[${PYTHON_USEDEP}]
223 + dev-python/ipywidgets[${PYTHON_USEDEP}]
224 + dev-python/widgetsnbextension[${PYTHON_USEDEP}]
225 + )
226 + qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
227 + smp? (
228 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
229 + >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
230 + )"
231 +
232 +PATCHES=( "${FILESDIR}"/2.1.0-substitute-files.patch )
233 +
234 +DISTUTILS_IN_SOURCE_BUILD=1
235 +
236 +python_prepare_all() {
237 + # Remove out of date insource files
238 + rm IPython/extensions/cythonmagic.py || die
239 + rm IPython/extensions/rmagic.py || die
240 +
241 + # Prevent un-needed download during build
242 + if use doc; then
243 + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
244 + fi
245 +
246 + distutils-r1_python_prepare_all
247 +}
248 +
249 +python_compile_all() {
250 + if use doc; then
251 + emake -C docs html_noapi
252 + HTML_DOCS=( docs/build/html/. )
253 + fi
254 +}
255 +
256 +src_test() {
257 + virtx distutils-r1_src_test
258 +}
259 +
260 +python_test() {
261 + distutils_install_for_testing
262 + pushd "${TEST_DIR}" >/dev/null || die
263 + "${TEST_DIR}"/scripts/iptest || die
264 + popd >/dev/null || die
265 +}
266 +
267 +python_install() {
268 + distutils-r1_python_install
269 +
270 + # Create ipythonX.Y symlinks.
271 + # TODO:
272 + # 1. do we want them for pypy? No. pypy has no numpy
273 + # 2. handle it in the eclass instead (use _python_ln_rel).
274 + # With pypy not an option the dosym becomes unconditional
275 + dosym ../lib/python-exec/${EPYTHON}/ipython \
276 + /usr/bin/ipython${EPYTHON#python}
277 +}
278 +
279 +python_install_all() {
280 + distutils-r1_python_install_all
281 +
282 + if use examples; then
283 + dodoc -r examples
284 + docompress -x /usr/share/doc/${PF}/examples
285 + fi
286 +}
287 +
288 +pkg_postinst() {
289 + optfeature "sympyprinting" dev-python/sympy
290 + optfeature "cythonmagic" dev-python/cython
291 + optfeature "%lprun magic command" dev-python/line_profiler
292 + optfeature "%mprun magic command" dev-python/memory_profiler
293 +
294 + if use nbconvert; then
295 + if ! has_version app-text/pandoc ; then
296 + einfo "Node.js will be used to convert notebooks to other formats"
297 + einfo "like HTML. Support for that is still experimental. If you"
298 + einfo "encounter any problems, please use app-text/pandoc instead."
299 + fi
300 + fi
301 +}