Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/spyder/
Date: Mon, 30 Mar 2020 11:27:27
Message-Id: 1585567598.d9a2d6cf1469a9bf1aec1c75fd54fe8b121883c6.juippis@gentoo
1 commit: d9a2d6cf1469a9bf1aec1c75fd54fe8b121883c6
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Mon Mar 30 08:33:38 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 30 11:26:38 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9a2d6cf
7
8 dev-python/spyder: use sed instead of patch
9
10 trying to patch file with DOS EOL
11 the patch got converted to UNIX EOL
12 somehwere along the road and is not working
13
14 Bug: https://bugs.gentoo.org/715148
15
16 Package-Manager: Portage-2.3.96, Repoman-2.3.22
17 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
18 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
19
20 dev-python/spyder/spyder-4.1.1-r2.ebuild | 163 +++++++++++++++++++++++++++++++
21 1 file changed, 163 insertions(+)
22
23 diff --git a/dev-python/spyder/spyder-4.1.1-r2.ebuild b/dev-python/spyder/spyder-4.1.1-r2.ebuild
24 new file mode 100644
25 index 00000000000..c423cf46ba9
26 --- /dev/null
27 +++ b/dev-python/spyder/spyder-4.1.1-r2.ebuild
28 @@ -0,0 +1,163 @@
29 +# Copyright 1999-2020 Gentoo Authors
30 +# Distributed under the terms of the GNU General Public License v2
31 +
32 +EAPI=7
33 +
34 +PYTHON_COMPAT=( python3_{6,7} )
35 +
36 +inherit eutils xdg distutils-r1 virtualx
37 +
38 +# Commit of documentation to fetch
39 +DOCS_PV="7c0b590"
40 +
41 +DESCRIPTION="The Scientific Python Development Environment"
42 +HOMEPAGE="
43 + https://www.spyder-ide.org/
44 + https://github.com/spyder-ide/spyder/
45 + https://pypi.org/project/spyder/"
46 +SRC_URI="https://github.com/spyder-ide/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
47 + https://github.com/spyder-ide/${PN}-docs/archive/${DOCS_PV}.tar.gz -> ${PN}-docs-${DOCS_PV}.tar.gz"
48 +
49 +LICENSE="MIT"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +
53 +RDEPEND="
54 + >=dev-python/atomicwrites-1.2.0[${PYTHON_USEDEP}]
55 + >=dev-python/chardet-2.0.0[${PYTHON_USEDEP}]
56 + >=dev-python/cloudpickle-0.5.0[${PYTHON_USEDEP}]
57 + >=dev-python/diff-match-patch-20181111[${PYTHON_USEDEP}]
58 + dev-python/intervaltree[${PYTHON_USEDEP}]
59 + >=dev-python/ipython-4.0[${PYTHON_USEDEP}]
60 + ~dev-python/jedi-0.15.2[${PYTHON_USEDEP}]
61 + dev-python/keyring[${PYTHON_USEDEP}]
62 + >=dev-python/nbconvert-4.0[${PYTHON_USEDEP}]
63 + >=dev-python/numpydoc-0.6.0[${PYTHON_USEDEP}]
64 + >=dev-python/parso-0.5.2[${PYTHON_USEDEP}]
65 + >=dev-python/pexpect-4.4.0[${PYTHON_USEDEP}]
66 + >=dev-python/pickleshare-0.4[${PYTHON_USEDEP}]
67 + >=dev-python/psutil-5.3[${PYTHON_USEDEP}]
68 + >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
69 + >=dev-python/pylint-0.25[${PYTHON_USEDEP}]
70 + >=dev-python/python-language-server-0.31.9[${PYTHON_USEDEP}]
71 + <dev-python/python-language-server-0.32.0[${PYTHON_USEDEP}]
72 + >=dev-python/pyxdg-0.26[${PYTHON_USEDEP}]
73 + >=dev-python/pyzmq-17.0.0[${PYTHON_USEDEP}]
74 + >=dev-python/qdarkstyle-2.8[${PYTHON_USEDEP}]
75 + >=dev-python/qtawesome-0.5.7[${PYTHON_USEDEP}]
76 + >=dev-python/qtconsole-4.6.0[${PYTHON_USEDEP}]
77 + >=dev-python/QtPy-1.5.0[${PYTHON_USEDEP},svg,webengine]
78 + >=dev-python/sphinx-0.6.6[${PYTHON_USEDEP}]
79 + >=dev-python/spyder-kernels-1.9.0[${PYTHON_USEDEP}]
80 + <dev-python/spyder-kernels-1.10.0[${PYTHON_USEDEP}]
81 + dev-python/watchdog[${PYTHON_USEDEP}]"
82 +
83 +DEPEND="test? (
84 + dev-python/coverage[${PYTHON_USEDEP}]
85 + dev-python/cython[${PYTHON_USEDEP}]
86 + dev-python/flaky[${PYTHON_USEDEP}]
87 + dev-python/matplotlib[tk,${PYTHON_USEDEP}]
88 + dev-python/mock[${PYTHON_USEDEP}]
89 + dev-python/pandas[${PYTHON_USEDEP}]
90 + dev-python/pillow[${PYTHON_USEDEP}]
91 + dev-python/pytest-lazy-fixture[${PYTHON_USEDEP}]
92 + dev-python/pytest-mock[${PYTHON_USEDEP}]
93 + dev-python/pytest-qt[${PYTHON_USEDEP}]
94 + sci-libs/scipy[${PYTHON_USEDEP}]
95 + dev-python/sympy[${PYTHON_USEDEP}]
96 + dev-python/xarray[${PYTHON_USEDEP}] )"
97 +
98 +# Based on the courtesy of Arfrever
99 +# This patch removes a call to update-desktop-database during build
100 +# This fails because access is denied to this command during build
101 +PATCHES=(
102 + "${FILESDIR}/${P}-build.patch"
103 + "${FILESDIR}/${P}-py3-only.patch"
104 +)
105 +
106 +distutils_enable_tests pytest
107 +distutils_enable_sphinx docs/doc --no-autodoc
108 +
109 +python_prepare_all() {
110 + # move docs into workdir
111 + mv ../spyder-docs-${DOCS_PV}* docs || die
112 +
113 + # allow newer parso: https://bugs.gentoo.org/715148
114 + sed -i -e 's/parso =0.5.2/parso >=0.5.2/g' requirements/conda.txt || die
115 + sed -i -e 's/parso==0.5.2/parso>=0.5.2/g' setup.py || die
116 + sed -i -e 's/=0.5.2/>=0.5.2/g' spyder/dependencies.py
117 +
118 + # some tests still depend on QtPy[webkit] which is going to be removed
119 + # spyder itself works fine without webkit
120 + rm spyder/widgets/tests/test_browser.py || die
121 + rm spyder/plugins/onlinehelp/tests/test_pydocgui.py || die
122 + rm spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py || die
123 + rm spyder/plugins/ipythonconsole/tests/test_ipython_config_dialog.py || die
124 + rm spyder/plugins/help/tests/test_widgets.py || die
125 + rm spyder/plugins/help/tests/test_plugin.py || die
126 + # fails to collect
127 + rm spyder/app/tests/test_mainwindow.py || die
128 +
129 + # skip online test
130 + rm spyder/widgets/github/tests/test_github_backend.py || die
131 +
132 + # AssertionError: assert 'import numpy' == '# import numpy'
133 + sed -i -e 's:test_comment:_&:' \
134 + spyder/plugins/editor/widgets/tests/test_codeeditor.py || die
135 +
136 + # AssertionError: assert '' == 'This is some test text!'
137 + sed -i -e 's:test_tab_copies_find_to_replace:_&:' \
138 + spyder/plugins/editor/widgets/tests/test_editor.py || die
139 +
140 + # RuntimeError: Unsafe load() call disabled by Gentoo. See bug #659348
141 + sed -i -e 's:test_dependencies_for_binder_in_sync:_&:' \
142 + spyder/tests/test_dependencies_in_sync.py || die
143 +
144 + # Fatal Python error: Segmentation fault
145 + sed -i -e 's:test_copy_path:_&:' \
146 + spyder/plugins/explorer/widgets/tests/test_explorer.py || die
147 +
148 + # No idea why this fails, no error just stops and dumps core
149 + sed -i -e 's:test_arrayeditor_edit_complex_array:_&:' \
150 + spyder/plugins/variableexplorer/widgets/tests/test_arrayeditor.py || die
151 +
152 + # Assertion error, can't connect/remember inside ebuild environment
153 + rm spyder/plugins/ipythonconsole/widgets/tests/test_kernelconnect.py || die
154 +
155 + # Assertion error (pytest-qt), maybe we can't do shortcuts inside ebuild environment?
156 + sed -i -e 's:test_transform_to_uppercase_shortcut:_&:' \
157 + -e 's:test_transform_to_lowercase_shortcut:_&:' \
158 + -e 's:test_go_to_line_shortcut:_&:' \
159 + -e 's:test_delete_line_shortcut:_&:' \
160 + spyder/plugins/editor/widgets/tests/test_shortcuts.py || die
161 +
162 + distutils-r1_python_prepare_all
163 +}
164 +
165 +python_test() {
166 + virtx pytest -vv
167 +}
168 +
169 +pkg_postinst() {
170 + xdg_pkg_postinst
171 +
172 + elog "To get additional features, optional runtime dependencies may be installed:"
173 + optfeature "2D/3D plotting in the Python and IPython consoles" dev-python/matplotlib
174 + optfeature "View and edit DataFrames and Series in the Variable Explorer" dev-python/pandas
175 + optfeature "View and edit two or three dimensional arrays in the Variable Explorer" dev-python/numpy
176 + optfeature "Symbolic mathematics in the IPython console" dev-python/sympy
177 + optfeature "Import Matlab workspace files in the Variable Explorer" sci-libs/scipy
178 + optfeature "Run Cython files in the IPython console" dev-python/cython
179 + optfeature "The hdf5/h5py plugin" dev-python/h5py
180 + optfeature "The line profiler plugin" dev-python/spyder-line-profiler
181 + optfeature "The memory profiler plugin" dev-python/spyder-memory-profiler
182 + # spyder-autopep8 and spyder-vim do not have a release (yet)
183 + # and are not compatible with >=spyder-4.0.0 at the moment
184 + # optfeature "The autopep8 plugin" dev-python/spyder-autopep8
185 + # optfeature "Vim key bindings" dev-python/spyder-vim
186 + optfeature "Unittest support" dev-python/spyder-unittest
187 + optfeature "Jupyter notebook support" dev-python/spyder-notebook
188 + optfeature "System terminal inside spyder" dev-python/spyder-terminal
189 + # spyder-reports not yet updated to >=spyder-4.0.0
190 + # optfeature "Markdown reports using Pweave" dev-python/spyder-reports
191 +}