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: Tue, 28 Feb 2023 18:16:42
Message-Id: 1677608185.2665efb90172886650b918a1de726210a4b029d1.arthurzam@gentoo
1 commit: 2665efb90172886650b918a1de726210a4b029d1
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 28 18:01:20 2023 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 28 18:16:25 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2665efb9
7
8 dev-python/ipython: add 8.11.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.11.0.ebuild | 156 +++++++++++++++++++++++++++++++
14 2 files changed, 157 insertions(+)
15
16 diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
17 index da249035a935..5e77ce6285f3 100644
18 --- a/dev-python/ipython/Manifest
19 +++ b/dev-python/ipython/Manifest
20 @@ -1,3 +1,4 @@
21 DIST ipython-8.10.0.tar.gz 5456256 BLAKE2B 8ca8781326396ffa1e8012bab3b539b857a68e212afd5b2b97bc2f0eac6ec1aee45c0743d745554ef24fabd24667c2d6cdb3927350ca61b747e02afa215c1519 SHA512 5cfcdd49120d9ffc11d2f18501826b2f7094a51c439ac23e507f1027989ece4104d739a1905feba41f899d22a66e1345333f46e0f55d18925f166906f4992cfe
22 +DIST ipython-8.11.0.tar.gz 5462176 BLAKE2B 6024c191f327d04f7a26f2f371b200e2e3f26029d84a3a53fc7421cb4751f0e29fb8741a2aa0447026b43cc1d9a7674a07e06c30578812cc33220c55df72c497 SHA512 9b07da3fed304f6739396883d0219386bb08d4860853b30f308c2e9b9017f48d1228dedb511c872b706881ee80dc7bf03f541720ffb816c35b66f6f53ac289a3
23 DIST ipython-8.8.0.tar.gz 5341086 BLAKE2B 6cab547c693494aed85c750ae566947c8035018213839c36ec906cf11c80e93269c4b861a5a4d72994bc4e5fc8f2787fd7674fdb836dad22c8c04c33d8f37de3 SHA512 18e8eaa285fe6278a27ffd2edcf4eccf629e05a8718faa721013d0433822ff8b850a2060135f26b5254a96b7ae0139e2ff4338676c08d3271a12c1b91532d7d1
24 DIST ipython-8.9.0.tar.gz 5454595 BLAKE2B bb091bf9c2d9571ded5e1007d9fe60d34b9b0010747759ccceee3368822e3e190766439e3dd9b26df2dbb136ed2b81bc0d89d9b8857baae6e4d86a3524c07972 SHA512 2a9df79ff26bb34866dc523e75ba8e8d8de25d510fc273cbbf762b3011e53ff5331869f1d6fc8c44df6c9a8b5745a0545fe301a556b7f20e3a3dfca994316735
25
26 diff --git a/dev-python/ipython/ipython-8.11.0.ebuild b/dev-python/ipython/ipython-8.11.0.ebuild
27 new file mode 100644
28 index 000000000000..a27077f31a94
29 --- /dev/null
30 +++ b/dev-python/ipython/ipython-8.11.0.ebuild
31 @@ -0,0 +1,156 @@
32 +# Copyright 1999-2023 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_{9..11} )
39 +PYTHON_REQ_USE='readline,sqlite,threads(+)'
40 +
41 +inherit distutils-r1 optfeature pypi virtualx
42 +
43 +DESCRIPTION="Advanced interactive shell for Python"
44 +HOMEPAGE="
45 + https://ipython.org/
46 + https://github.com/ipython/ipython/
47 + https://pypi.org/project/ipython/
48 +"
49 +
50 +LICENSE="BSD"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
53 +IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
54 +RESTRICT="!test? ( test )"
55 +
56 +RDEPEND="
57 + dev-python/backcall[${PYTHON_USEDEP}]
58 + dev-python/decorator[${PYTHON_USEDEP}]
59 + >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
60 + dev-python/matplotlib[${PYTHON_USEDEP}]
61 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
62 + >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
63 + dev-python/pickleshare[${PYTHON_USEDEP}]
64 + >=dev-python/prompt-toolkit-3.0.30[${PYTHON_USEDEP}]
65 + <dev-python/prompt-toolkit-3.1[${PYTHON_USEDEP}]
66 + >=dev-python/pygments-2.4.0[${PYTHON_USEDEP}]
67 + dev-python/setuptools[${PYTHON_USEDEP}]
68 + dev-python/stack_data[${PYTHON_USEDEP}]
69 + >=dev-python/traitlets-5.0[${PYTHON_USEDEP}]
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.21[${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 +
90 +distutils_enable_tests pytest
91 +
92 +RDEPEND+="
93 + nbconvert? (
94 + dev-python/nbconvert[${PYTHON_USEDEP}]
95 + )
96 +"
97 +PDEPEND="
98 + notebook? (
99 + dev-python/notebook[${PYTHON_USEDEP}]
100 + dev-python/ipywidgets[${PYTHON_USEDEP}]
101 + dev-python/widgetsnbextension[${PYTHON_USEDEP}]
102 + )
103 + qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
104 + smp? (
105 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
106 + >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
107 + )
108 +"
109 +
110 +PATCHES=( "${FILESDIR}"/2.1.0-substitute-files.patch )
111 +
112 +python_prepare_all() {
113 + # Remove out of date insource files
114 + #rm IPython/extensions/cythonmagic.py || die
115 + #rm IPython/extensions/rmagic.py || die
116 +
117 + # Prevent un-needed download during build
118 + if use doc; then
119 + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
120 + fi
121 +
122 + # Rename the test directory to reduce sys.path pollution
123 + # https://github.com/ipython/ipython/issues/12892
124 + mv IPython/extensions/{,ipython_}tests || die
125 +
126 + distutils-r1_python_prepare_all
127 +}
128 +
129 +python_compile_all() {
130 + if use doc; then
131 + emake -C docs html_noapi
132 + HTML_DOCS=( docs/build/html/. )
133 + fi
134 +}
135 +
136 +src_test() {
137 + virtx distutils-r1_src_test
138 +}
139 +
140 +python_test() {
141 + local -x IPYTHON_TESTING_TIMEOUT_SCALE=20
142 + local EPYTEST_DESELECT=(
143 + # TODO: looks to be a regression due to a newer dep
144 + IPython/core/tests/test_oinspect.py::test_class_signature
145 + IPython/core/tests/test_oinspect.py::test_render_signature_long
146 + IPython/terminal/tests/test_shortcuts.py::test_modify_shortcut_with_filters
147 + )
148 + # nonfatal implied by virtx
149 + nonfatal 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 +}