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: Thu, 17 Jun 2021 06:40:15
Message-Id: 1623912006.72ea37843f52f65c1d552be072329c0c6c74543e.mgorny@gentoo
1 commit: 72ea37843f52f65c1d552be072329c0c6c74543e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 17 06:21:09 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 17 06:40:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72ea3784
7
8 dev-python/ipython: Revbump to lift arm test-mask
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/ipython/ipython-7.24.1-r1.ebuild | 139 ++++++++++++++++++++++++++++
13 1 file changed, 139 insertions(+)
14
15 diff --git a/dev-python/ipython/ipython-7.24.1-r1.ebuild b/dev-python/ipython/ipython-7.24.1-r1.ebuild
16 new file mode 100644
17 index 00000000000..b04e1404dc4
18 --- /dev/null
19 +++ b/dev-python/ipython/ipython-7.24.1-r1.ebuild
20 @@ -0,0 +1,139 @@
21 +# Copyright 1999-2021 Gentoo Authors
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=7
25 +
26 +DISTUTILS_USE_SETUPTOOLS=no
27 +PYTHON_COMPAT=( python3_{7..9} )
28 +PYTHON_REQ_USE='readline,sqlite,threads(+)'
29 +
30 +inherit distutils-r1 optfeature virtualx
31 +
32 +DESCRIPTION="Advanced interactive shell for Python"
33 +HOMEPAGE="https://ipython.org/ https://github.com/ipython/ipython/"
34 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
35 +
36 +LICENSE="BSD"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86"
39 +IUSE="doc examples matplotlib notebook nbconvert qt5 +smp test"
40 +RESTRICT="!test? ( test )"
41 +
42 +RDEPEND="
43 + dev-python/backcall[${PYTHON_USEDEP}]
44 + dev-python/decorator[${PYTHON_USEDEP}]
45 + >=dev-python/jedi-0.16[${PYTHON_USEDEP}]
46 + >=dev-python/pexpect-4.3[${PYTHON_USEDEP}]
47 + dev-python/pickleshare[${PYTHON_USEDEP}]
48 + >=dev-python/prompt_toolkit-2[${PYTHON_USEDEP}]
49 + <dev-python/prompt_toolkit-3.1[${PYTHON_USEDEP}]
50 + dev-python/pygments[${PYTHON_USEDEP}]
51 + dev-python/traitlets[${PYTHON_USEDEP}]
52 + matplotlib? (
53 + dev-python/matplotlib[${PYTHON_USEDEP}]
54 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
55 + )
56 +"
57 +
58 +BDEPEND="
59 + test? (
60 + app-text/dvipng[truetype]
61 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
62 + dev-python/matplotlib[${PYTHON_USEDEP}]
63 + dev-python/matplotlib-inline[${PYTHON_USEDEP}]
64 + dev-python/nbformat[${PYTHON_USEDEP}]
65 + dev-python/nose[${PYTHON_USEDEP}]
66 + >=dev-python/numpy-1.17[${PYTHON_USEDEP}]
67 + dev-python/requests[${PYTHON_USEDEP}]
68 + dev-python/testpath[${PYTHON_USEDEP}]
69 + )
70 + doc? (
71 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
72 + dev-python/matplotlib[${PYTHON_USEDEP}]
73 + >=dev-python/sphinx-2[${PYTHON_USEDEP}]
74 + dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
75 + )"
76 +
77 +distutils_enable_tests pytest
78 +
79 +RDEPEND+="
80 + nbconvert? ( dev-python/nbconvert[${PYTHON_USEDEP}] )"
81 +PDEPEND="
82 + notebook? (
83 + dev-python/notebook[${PYTHON_USEDEP}]
84 + dev-python/ipywidgets[${PYTHON_USEDEP}]
85 + dev-python/widgetsnbextension[${PYTHON_USEDEP}]
86 + )
87 + qt5? ( dev-python/qtconsole[${PYTHON_USEDEP}] )
88 + smp? (
89 + >=dev-python/ipykernel-5.1.0[${PYTHON_USEDEP}]
90 + >=dev-python/ipyparallel-6.2.3[${PYTHON_USEDEP}]
91 + )"
92 +
93 +PATCHES=( "${FILESDIR}"/2.1.0-substitute-files.patch )
94 +
95 +DISTUTILS_IN_SOURCE_BUILD=1
96 +
97 +python_prepare_all() {
98 + # Remove out of date insource files
99 + rm IPython/extensions/cythonmagic.py || die
100 + rm IPython/extensions/rmagic.py || die
101 +
102 + # Prevent un-needed download during build
103 + if use doc; then
104 + sed -e "/^ 'sphinx.ext.intersphinx',/d" -i docs/source/conf.py || die
105 + fi
106 +
107 + # Rename the test directory to reduce sys.path pollution
108 + # https://github.com/ipython/ipython/issues/12892
109 + mv IPython/extensions/{,ipython_}tests || die
110 +
111 + distutils-r1_python_prepare_all
112 +}
113 +
114 +python_compile_all() {
115 + if use doc; then
116 + emake -C docs html_noapi
117 + HTML_DOCS=( docs/build/html/. )
118 + fi
119 +}
120 +
121 +src_test() {
122 + virtx distutils-r1_src_test
123 +}
124 +
125 +python_install() {
126 + distutils-r1_python_install
127 +
128 + # Create ipythonX.Y symlinks.
129 + # TODO:
130 + # 1. do we want them for pypy? No. pypy has no numpy
131 + # 2. handle it in the eclass instead (use _python_ln_rel).
132 + # With pypy not an option the dosym becomes unconditional
133 + dosym ../lib/python-exec/${EPYTHON}/ipython \
134 + /usr/bin/ipython${EPYTHON#python}
135 +}
136 +
137 +python_install_all() {
138 + distutils-r1_python_install_all
139 +
140 + if use examples; then
141 + dodoc -r examples
142 + docompress -x /usr/share/doc/${PF}/examples
143 + fi
144 +}
145 +
146 +pkg_postinst() {
147 + optfeature "sympyprinting" dev-python/sympy
148 + optfeature "cythonmagic" dev-python/cython
149 + optfeature "%lprun magic command" dev-python/line_profiler
150 + optfeature "%mprun magic command" dev-python/memory_profiler
151 +
152 + if use nbconvert; then
153 + if ! has_version app-text/pandoc ; then
154 + einfo "Node.js will be used to convert notebooks to other formats"
155 + einfo "like HTML. Support for that is still experimental. If you"
156 + einfo "encounter any problems, please use app-text/pandoc instead."
157 + fi
158 + fi
159 +}