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