Gentoo Archives: gentoo-commits

From: Arthur Zamarin <arthurzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/ipython/
Date: Fri, 09 Sep 2022 07:23:27
Message-Id: 1662708177.85ea8f18edc00fa87d84588d1043b9714b8bf679.arthurzam@gentoo
1 commit: 85ea8f18edc00fa87d84588d1043b9714b8bf679
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 9 07:20:00 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 9 07:22:57 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85ea8f18
7
8 dev-python/ipython: add 8.5.0
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/ipython/Manifest | 1 +
13 dev-python/ipython/ipython-8.5.0.ebuild | 162 ++++++++++++++++++++++++++++++++
14 2 files changed, 163 insertions(+)
15
16 diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
17 index 4f96f417317c..68df50f32116 100644
18 --- a/dev-python/ipython/Manifest
19 +++ b/dev-python/ipython/Manifest
20 @@ -1 +1,2 @@
21 DIST ipython-8.4.0.tar.gz 5314601 BLAKE2B 4a5804ad115b45568ddbc0b8fcd181ae0088690ae2d7dda8580588d1e1caa087582a279449142e0144568815270b3a9476893525c0e90320f9ec580a06126d1d SHA512 975915ee64ce6f3fc9bcda383c784759dd8b19151428b10ef92020097718c6e2a9804a00fe02bd541b845eca146c63a672f25ad4f00ec5302b3c61ae0c6935ce
22 +DIST ipython-8.5.0.tar.gz 5319096 BLAKE2B 6ab330ffe99611478bdcf1211a500c08edd4aff802a1121156c302cb8a49b9c5f2fa98012dbaf80996574789bdb98d87924492181e45f00f46f600789c1ae6e4 SHA512 9339507fbe229d83f4c41b79257a7b40890d9d0601692521a61dc777c040a6d22d131014d660ffc9ba79f7128f579082473642f47b86e59a038f79c6553c8186
23
24 diff --git a/dev-python/ipython/ipython-8.5.0.ebuild b/dev-python/ipython/ipython-8.5.0.ebuild
25 new file mode 100644
26 index 000000000000..bf72d46c9cb2
27 --- /dev/null
28 +++ b/dev-python/ipython/ipython-8.5.0.ebuild
29 @@ -0,0 +1,162 @@
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..10} )
37 +PYTHON_REQ_USE='readline,sqlite,threads(+)'
38 +
39 +inherit distutils-r1 optfeature virtualx
40 +
41 +DESCRIPTION="Advanced interactive shell for Python"
42 +HOMEPAGE="https://ipython.org/ https://github.com/ipython/ipython/"
43 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
44 +
45 +LICENSE="BSD"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
48 +IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
49 +RESTRICT="!test? ( test )"
50 +
51 +RDEPEND="
52 + dev-python/backcall[${PYTHON_USEDEP}]
53 + dev-python/decorator[${PYTHON_USEDEP}]
54 + >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
55 + dev-python/matplotlib[${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 +"
66 +
67 +BDEPEND="
68 + test? (
69 + app-text/dvipng[truetype]
70 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
71 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
72 + dev-python/nbformat[${PYTHON_USEDEP}]
73 + >=dev-python/numpy-1.19[${PYTHON_USEDEP}]
74 + dev-python/requests[${PYTHON_USEDEP}]
75 + dev-python/testpath[${PYTHON_USEDEP}]
76 + )
77 + doc? (
78 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
79 + dev-python/matplotlib[${PYTHON_USEDEP}]
80 + >=dev-python/sphinx-2[${PYTHON_USEDEP}]
81 + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
82 + )
83 +"
84 +
85 +distutils_enable_tests pytest
86 +
87 +RDEPEND+="
88 + nbconvert? (
89 + dev-python/nbconvert[${PYTHON_USEDEP}]
90 + )
91 +"
92 +PDEPEND="
93 + notebook? (
94 + dev-python/notebook[${PYTHON_USEDEP}]
95 + dev-python/ipywidgets[${PYTHON_USEDEP}]
96 + dev-python/widgetsnbextension[${PYTHON_USEDEP}]
97 + )
98 + qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
99 + smp? (
100 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
101 + >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
102 + )
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 + # TODO
144 + IPython/extensions/ipython_tests/test_autoreload.py::TestAutoreload::test_smoketest_aimport
145 + IPython/extensions/ipython_tests/test_autoreload.py::TestAutoreload::test_smoketest_autoreload
146 + )
147 + [[ ${EPYTHON} == python3.10 ]] && EPYTEST_DESELECT+=(
148 + # TODO
149 + IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups
150 + IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions
151 + )
152 + # nonfatal implied by virtx
153 + nonfatal epytest || die "Tests failed with ${EPYTHON}"
154 +}
155 +
156 +python_install() {
157 + distutils-r1_python_install
158 +
159 + # Create ipythonX.Y symlinks.
160 + # TODO:
161 + # 1. do we want them for pypy? No. pypy has no numpy
162 + # 2. handle it in the eclass instead (use _python_ln_rel).
163 + # With pypy not an option the dosym becomes unconditional
164 + dosym ../lib/python-exec/${EPYTHON}/ipython \
165 + /usr/bin/ipython${EPYTHON#python}
166 +}
167 +
168 +python_install_all() {
169 + distutils-r1_python_install_all
170 +
171 + if use examples; then
172 + dodoc -r examples
173 + docompress -x /usr/share/doc/${PF}/examples
174 + fi
175 +}
176 +
177 +pkg_postinst() {
178 + optfeature "code formatting" dev-python/black
179 + optfeature "sympyprinting" dev-python/sympy
180 + optfeature "cythonmagic" dev-python/cython
181 + optfeature "%lprun magic command" dev-python/line_profiler
182 + optfeature "%mprun magic command" dev-python/memory_profiler
183 +
184 + if use nbconvert; then
185 + if ! has_version app-text/pandoc ; then
186 + einfo "Node.js will be used to convert notebooks to other formats"
187 + einfo "like HTML. Support for that is still experimental. If you"
188 + einfo "encounter any problems, please use app-text/pandoc instead."
189 + fi
190 + fi
191 +}