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: Thu, 06 Jan 2022 19:55:22
Message-Id: 1641498893.a4db8f88a50ebbe297e0304363a396b1be5c3f37.arthurzam@gentoo
1 commit: a4db8f88a50ebbe297e0304363a396b1be5c3f37
2 Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 6 19:52:15 2022 +0000
4 Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 6 19:54:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4db8f88
7
8 dev-python/ipython: add 7.31.0
9
10 Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
11
12 dev-python/ipython/Manifest | 1 +
13 dev-python/ipython/ipython-7.31.0.ebuild | 153 +++++++++++++++++++++++++++++++
14 2 files changed, 154 insertions(+)
15
16 diff --git a/dev-python/ipython/Manifest b/dev-python/ipython/Manifest
17 index 34264bbdc018..805c596a351d 100644
18 --- a/dev-python/ipython/Manifest
19 +++ b/dev-python/ipython/Manifest
20 @@ -1,2 +1,3 @@
21 DIST ipython-7.29.0.tar.gz 5151803 BLAKE2B 685bb7df39513fe262c07dbb10de4d795860bf2958c626d030bfa3e18052a98d7c9d5f0f96c0c9a5d4b9fdcfab09c492457d409f05ce522f607456ff3a4b35fd SHA512 b8e9cc07a0f77bbfaa88183546ed9d7e4a4c37e7c1704b1a3716d605a04339f986c7767f3c0920a94039eda99e75afb62a7bb43fa0cde6699a902f3b8f83a398
22 DIST ipython-7.30.1.tar.gz 5154336 BLAKE2B 0753433eea2ee6a5a6451db6aa537c9c9469c749b970ecdd040123787064e7be78363060a785c7ea4175b8e0f4f2bfefa15485f6f5412ec34690fe505a1cfb97 SHA512 839f709e019dd5efe32730f2e4c457e6dae0db5490844805d30f12a1fd17bfb2f991f1374a84542b2392d3ce332096d3922471c6b14149331075be8719b14734
23 +DIST ipython-7.31.0.tar.gz 5154974 BLAKE2B 5debac9a1011cc6541a2ce97df5d8793465ce4c289d1293c33c29eacc23cbd2271f0a8d7362c3445a88d080edefd85046aebc8782cd930c3dd8b6837ec682bf6 SHA512 705122ca63df17812ab360da06d58431b51d3a1f3bba47df7131e882de64de54c6986e7ba3d55f4b77c4b1049981b0100ba64825e952b25712c843ef7e975e2f
24
25 diff --git a/dev-python/ipython/ipython-7.31.0.ebuild b/dev-python/ipython/ipython-7.31.0.ebuild
26 new file mode 100644
27 index 000000000000..dfb591368fb8
28 --- /dev/null
29 +++ b/dev-python/ipython/ipython-7.31.0.ebuild
30 @@ -0,0 +1,153 @@
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_SETUPTOOLS=no
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 ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
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/pexpect-4.3[${PYTHON_USEDEP}]
57 + dev-python/pickleshare[${PYTHON_USEDEP}]
58 + >=dev-python/prompt_toolkit-2[${PYTHON_USEDEP}]
59 + <dev-python/prompt_toolkit-3.1[${PYTHON_USEDEP}]
60 + dev-python/pygments[${PYTHON_USEDEP}]
61 + dev-python/traitlets[${PYTHON_USEDEP}]
62 + matplotlib? (
63 + dev-python/matplotlib[${PYTHON_USEDEP}]
64 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
65 + )
66 +"
67 +
68 +BDEPEND="
69 + test? (
70 + app-text/dvipng[truetype]
71 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
72 + dev-python/matplotlib[${PYTHON_USEDEP}]
73 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
74 + dev-python/nbformat[${PYTHON_USEDEP}]
75 + dev-python/nose[${PYTHON_USEDEP}]
76 + >=dev-python/numpy-1.17[${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 +DISTUTILS_IN_SOURCE_BUILD=1
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 + [[ ${EPYTHON} == python3.10 ]] && EPYTEST_DESELECT+=(
137 + # TODO
138 + IPython/core/tests/test_completer.py::TestCompleter::test_all_completions_dups
139 + IPython/core/tests/test_completer.py::TestCompleter::test_deduplicate_completions
140 + IPython/core/tests/test_oinspect.py::test_pinfo_docstring_if_detail_and_no_source
141 + # fails due to changed argparse output
142 + IPython/core/tests/test_magic_arguments.py::test_magic_arguments
143 + # py3.10 API incompat, doesn't look important
144 + IPython/lib/tests/test_pretty.py::test_pprint_heap_allocated_type
145 + )
146 + virtx epytest
147 +}
148 +
149 +python_install() {
150 + distutils-r1_python_install
151 +
152 + # Create ipythonX.Y symlinks.
153 + # TODO:
154 + # 1. do we want them for pypy? No. pypy has no numpy
155 + # 2. handle it in the eclass instead (use _python_ln_rel).
156 + # With pypy not an option the dosym becomes unconditional
157 + dosym ../lib/python-exec/${EPYTHON}/ipython \
158 + /usr/bin/ipython${EPYTHON#python}
159 +}
160 +
161 +python_install_all() {
162 + distutils-r1_python_install_all
163 +
164 + if use examples; then
165 + dodoc -r examples
166 + docompress -x /usr/share/doc/${PF}/examples
167 + fi
168 +}
169 +
170 +pkg_postinst() {
171 + optfeature "sympyprinting" dev-python/sympy
172 + optfeature "cythonmagic" dev-python/cython
173 + optfeature "%lprun magic command" dev-python/line_profiler
174 + optfeature "%mprun magic command" dev-python/memory_profiler
175 +
176 + if use nbconvert; then
177 + if ! has_version app-text/pandoc ; then
178 + einfo "Node.js will be used to convert notebooks to other formats"
179 + einfo "like HTML. Support for that is still experimental. If you"
180 + einfo "encounter any problems, please use app-text/pandoc instead."
181 + fi
182 + fi
183 +}