Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/
Date: Fri, 25 Feb 2022 23:41:35
Message-Id: 1645829614.59fff969fd292aa562745c16be0b1ffa22244ba2.mgorny@gentoo
1 commit: 59fff969fd292aa562745c16be0b1ffa22244ba2
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Feb 25 22:53:34 2022 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Feb 25 22:53:34 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59fff969
7
8 dev-python/ipython: Bump to 8.1.0
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/ipython/Manifest | 1 +
13 dev-python/ipython/ipython-8.1.0.ebuild | 157 ++++++++++++++++++++++++++++++++
14 2 files changed, 158 insertions(+)
15
16 diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
17 index 4fc54bdcf16f..557c4aaa65ad 100644
18 --- a/dev-python/ipython/Manifest
19 +++ b/dev-python/ipython/Manifest
20 @@ -1,2 +1,3 @@
21 DIST ipython-7.31.1.tar.gz 5156314 BLAKE2B e6528c9d3920078918180c4c2fae5d0ac20cd377e012691fee4c0cfa6c3056c739efc1ab9cc6231f55034d70619e501ff30e31b929bd5f1f623c89075abfb02d SHA512 7bd1378f7b2bd2146d8c2cf15c958b08f286b0163ca3e267bcd92c3f988d2d20cf48fd6e3c185eed6d30baceb195aeb0170280900e587c898d0812c4ffdee3a0
22 DIST ipython-8.0.1.tar.gz 5306811 BLAKE2B 9088faf779e2783ce97c6a45f0baa3c7163e12f63546aa65eb961de2b2fbacaac8ba1cf0c3c705bc326b4c999fe3ce672f31e3abaa7168d912504880ad8d3c2f SHA512 c4f3cf6e4aa7dab1e4e8cec2d669e5fe4ea3eeac9063132a38544596fafbaaed0f287bbdce12e8bc3d7613766c51b0e1ff8c7c86fdbd53e387caade6bbcdb828
23 +DIST ipython-8.1.0.tar.gz 5312523 BLAKE2B 9a44555dcb91655c5d483a7ba5d99074b9c2c4af3ec272d0adabc345352359b061ea4fd92198c3910945139edb80c8837afe1ae3c34b0bddb517d226584f28a1 SHA512 847ddab96ecfe06e46921b081fe3a51910c3fde1fa440c9955e374614b1ae6a7d20fc2e78d286178366893d342126a01a160a4efb0aa7be0b2234229638e95bc
24
25 diff --git a/dev-python/ipython/ipython-8.1.0.ebuild b/dev-python/ipython/ipython-8.1.0.ebuild
26 new file mode 100644
27 index 000000000000..fef74efca97e
28 --- /dev/null
29 +++ b/dev-python/ipython/ipython-8.1.0.ebuild
30 @@ -0,0 +1,157 @@
31 +# Copyright 1999-2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DISTUTILS_USE_PEP517=setuptools
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +PYTHON_REQ_USE='readline,sqlite,threads(+)'
39 +
40 +inherit distutils-r1 optfeature virtualx
41 +
42 +DESCRIPTION="Advanced interactive shell for Python"
43 +HOMEPAGE="https://ipython.org/ https://github.com/ipython/ipython/"
44 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
45 +
46 +LICENSE="BSD"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~riscv ~sparc"
49 +IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
50 +RESTRICT="!test? ( test )"
51 +
52 +RDEPEND="
53 + dev-python/backcall[${PYTHON_USEDEP}]
54 + dev-python/decorator[${PYTHON_USEDEP}]
55 + >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
56 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
57 + >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
58 + dev-python/pickleshare[${PYTHON_USEDEP}]
59 + >=dev-python/prompt_toolkit-2[${PYTHON_USEDEP}]
60 + <dev-python/prompt_toolkit-3.1[${PYTHON_USEDEP}]
61 + >=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
62 + dev-python/setuptools[${PYTHON_USEDEP}]
63 + dev-python/stack_data[${PYTHON_USEDEP}]
64 + >=dev-python/traitlets-5.0[${PYTHON_USEDEP}]
65 + matplotlib? (
66 + dev-python/matplotlib[${PYTHON_USEDEP}]
67 + )
68 +"
69 +
70 +BDEPEND="
71 + test? (
72 + app-text/dvipng[truetype]
73 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
74 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
75 + dev-python/nbformat[${PYTHON_USEDEP}]
76 + >=dev-python/numpy-1.19[${PYTHON_USEDEP}]
77 + dev-python/requests[${PYTHON_USEDEP}]
78 + dev-python/testpath[${PYTHON_USEDEP}]
79 + )
80 + doc? (
81 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
82 + dev-python/matplotlib[${PYTHON_USEDEP}]
83 + >=dev-python/sphinx-2[${PYTHON_USEDEP}]
84 + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
85 + )"
86 +
87 +distutils_enable_tests pytest
88 +
89 +RDEPEND+="
90 + nbconvert? (
91 + dev-python/nbconvert[${PYTHON_USEDEP}]
92 + )"
93 +PDEPEND="
94 + notebook? (
95 + dev-python/notebook[${PYTHON_USEDEP}]
96 + dev-python/ipywidgets[${PYTHON_USEDEP}]
97 + dev-python/widgetsnbextension[${PYTHON_USEDEP}]
98 + )
99 + qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
100 + smp? (
101 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
102 + >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
103 + )"
104 +
105 +PATCHES=( "${FILESDIR}"/2.1.0-substitute-files.patch )
106 +
107 +python_prepare_all() {
108 + # Remove out of date insource files
109 + #rm IPython/extensions/cythonmagic.py || die
110 + #rm IPython/extensions/rmagic.py || die
111 +
112 + # Prevent un-needed download during build
113 + if use doc; then
114 + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
115 + fi
116 +
117 + # Rename the test directory to reduce sys.path pollution
118 + # https://github.com/ipython/ipython/issues/12892
119 + mv IPython/extensions/{,ipython_}tests || die
120 +
121 + distutils-r1_python_prepare_all
122 +}
123 +
124 +python_compile_all() {
125 + if use doc; then
126 + emake -C docs html_noapi
127 + HTML_DOCS=( docs/build/html/. )
128 + fi
129 +}
130 +
131 +src_test() {
132 + virtx distutils-r1_src_test
133 +}
134 +
135 +python_test() {
136 + local -x IPYTHON_TESTING_TIMEOUT_SCALE=20
137 + local EPYTEST_DESELECT=(
138 + # Internet
139 + IPython/core/display.py::IPython.core.display.Image.__init__
140 + # TODO: looks to be a regression due to a newer dep
141 + IPython/core/tests/test_oinspect.py::test_class_signature
142 + IPython/core/tests/test_oinspect.py::test_render_signature_long
143 + )
144 + [[ ${EPYTHON} == python3.10 ]] && EPYTEST_DESELECT+=(
145 + # TODO
146 + IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups
147 + IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions
148 + )
149 + epytest || die "Tests failed with ${EPYTHON}"
150 +}
151 +
152 +python_install() {
153 + distutils-r1_python_install
154 +
155 + # Create ipythonX.Y symlinks.
156 + # TODO:
157 + # 1. do we want them for pypy? No. pypy has no numpy
158 + # 2. handle it in the eclass instead (use _python_ln_rel).
159 + # With pypy not an option the dosym becomes unconditional
160 + dosym ../lib/python-exec/${EPYTHON}/ipython \
161 + /usr/bin/ipython${EPYTHON#python}
162 +}
163 +
164 +python_install_all() {
165 + distutils-r1_python_install_all
166 +
167 + if use examples; then
168 + dodoc -r examples
169 + docompress -x /usr/share/doc/${PF}/examples
170 + fi
171 +}
172 +
173 +pkg_postinst() {
174 + optfeature "code formatting" dev-python/black
175 + optfeature "sympyprinting" dev-python/sympy
176 + optfeature "cythonmagic" dev-python/cython
177 + optfeature "%lprun magic command" dev-python/line_profiler
178 + optfeature "%mprun magic command" dev-python/memory_profiler
179 +
180 + if use nbconvert; then
181 + if ! has_version app-text/pandoc ; then
182 + einfo "Node.js will be used to convert notebooks to other formats"
183 + einfo "like HTML. Support for that is still experimental. If you"
184 + einfo "encounter any problems, please use app-text/pandoc instead."
185 + fi
186 + fi
187 +}