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