Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/spyder/, dev-python/spyder/files/
Date: Mon, 07 Nov 2022 11:29:22
Message-Id: 1667820542.8849ab5008c9507ed371b59b76d8275b4163ba88.andrewammerlaan@gentoo
1 commit: 8849ab5008c9507ed371b59b76d8275b4163ba88
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 7 11:29:02 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 7 11:29:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8849ab50
7
8 dev-python/spyder: add 5.4.0
9
10 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
11
12 dev-python/spyder/Manifest | 1 +
13 .../files/spyder-5.4.0-unpin-qdarkstyle.patch | 26 +++
14 dev-python/spyder/spyder-5.4.0.ebuild | 195 +++++++++++++++++++++
15 3 files changed, 222 insertions(+)
16
17 diff --git a/dev-python/spyder/Manifest b/dev-python/spyder/Manifest
18 index b6f3257168e2..9c11f1b72b36 100644
19 --- a/dev-python/spyder/Manifest
20 +++ b/dev-python/spyder/Manifest
21 @@ -1,2 +1,3 @@
22 DIST spyder-5.3.3.gh.tar.gz 24443628 BLAKE2B 767b3e1d59ce650d2df0d229d94eef53bc4c7b52f5d40fd62748efeb3a756a773110aa17442403a1b37777dd39fc367164ad54cd8f767d4311caa8d3e8bf05da SHA512 7d521f8367953849233538cbfd74f1fd98da87e69dbed8076718e81cd09ae66aca84523c4ecdf0e8aeb60644791754df19f09dd244ce11e3f7decc97bb050e02
23 +DIST spyder-5.4.0.gh.tar.gz 24497211 BLAKE2B 6022e50345a7493e79cc05d735fcded1d109f7b33c94c4b281a0526fe2c3f5c1020c30bc1a48cdde28db6b279b38f191dc6974724ca893220bac034c69ffd46c SHA512 473408c8315ab46dade4cdfb709119d29a38ea77f29c3dc5a8b4e7eece5c1cbd21978ed2665fc6747ef4db9d8726d4ba796ee0716d48657367bb9840760e786f
24 DIST spyder-docs-bb9b308b66cc90e47f43418f079bf098eb4efe6c.gh.tar.gz 89966852 BLAKE2B 7698b0210ccfec9f00cc76893f49398a02878c732eba6bbc89c1da4514734aad8ae8ef85a9c701a1d194976a35a8092755f7c5f09b319f670fac21d0a2e6c542 SHA512 9dd428ca2623c5703076887ab593bd92a2e737d74eb914a7a186d2ab4855519abb02875226463d8c11ff5021e7e84a5ba7c200ad5476f0dc4646831bb0b197a1
25
26 diff --git a/dev-python/spyder/files/spyder-5.4.0-unpin-qdarkstyle.patch b/dev-python/spyder/files/spyder-5.4.0-unpin-qdarkstyle.patch
27 new file mode 100644
28 index 000000000000..87b97a94b34a
29 --- /dev/null
30 +++ b/dev-python/spyder/files/spyder-5.4.0-unpin-qdarkstyle.patch
31 @@ -0,0 +1,26 @@
32 +diff --git a/setup.py b/setup.py
33 +index 1aa7f96..5345b0a 100644
34 +--- a/setup.py
35 ++++ b/setup.py
36 +@@ -232,7 +232,7 @@ install_requires = [
37 + 'python-lsp-server[all]>=1.6.0,<1.7.0',
38 + 'pyxdg>=0.26;platform_system=="Linux"',
39 + 'pyzmq>=22.1.0',
40 +- 'qdarkstyle>=3.0.2,<3.1.0',
41 ++ 'qdarkstyle>=3.0.2',
42 + 'qstylizer>=0.2.2',
43 + 'qtawesome>=1.2.1',
44 + 'qtconsole>=5.4.0,<5.5.0',
45 +diff --git a/spyder/dependencies.py b/spyder/dependencies.py
46 +index 244a161..f44d045 100644
47 +--- a/spyder/dependencies.py
48 ++++ b/spyder/dependencies.py
49 +@@ -58,7 +58,7 @@ PYLSP_BLACK_REQVER = '>=1.2.0'
50 + PYLS_SPYDER_REQVER = '>=0.4.0'
51 + PYXDG_REQVER = '>=0.26'
52 + PYZMQ_REQVER = '>=22.1.0'
53 +-QDARKSTYLE_REQVER = '>=3.0.2;<3.1.0'
54 ++QDARKSTYLE_REQVER = '>=3.0.2'
55 + QSTYLIZER_REQVER = '>=0.2.2'
56 + QTAWESOME_REQVER = '>=1.2.1'
57 + QTCONSOLE_REQVER = '>=5.4.0;<5.5.0'
58
59 diff --git a/dev-python/spyder/spyder-5.4.0.ebuild b/dev-python/spyder/spyder-5.4.0.ebuild
60 new file mode 100644
61 index 000000000000..72dde78556eb
62 --- /dev/null
63 +++ b/dev-python/spyder/spyder-5.4.0.ebuild
64 @@ -0,0 +1,195 @@
65 +# Copyright 1999-2022 Gentoo Authors
66 +# Distributed under the terms of the GNU General Public License v2
67 +
68 +EAPI=8
69 +
70 +PYTHON_COMPAT=( python3_{8..10} )
71 +DISTUTILS_USE_PEP517=setuptools
72 +
73 +inherit optfeature xdg distutils-r1
74 +
75 +# Commit of documentation to fetch
76 +DOCS_PV="bb9b308b66cc90e47f43418f079bf098eb4efe6c"
77 +
78 +DESCRIPTION="The Scientific Python Development Environment"
79 +HOMEPAGE="
80 + https://www.spyder-ide.org/
81 + https://github.com/spyder-ide/spyder/
82 + https://pypi.org/project/spyder/
83 +"
84 +SRC_URI="
85 + https://github.com/spyder-ide/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
86 + https://github.com/spyder-ide/${PN}-docs/archive/${DOCS_PV}.tar.gz -> ${PN}-docs-${DOCS_PV}.gh.tar.gz
87 +"
88 +
89 +LICENSE="MIT"
90 +SLOT="0"
91 +KEYWORDS="~amd64 ~x86"
92 +
93 +# The test suite often hangs or does not work. RESTRICTing because IMO it is
94 +# not worth the several hours I would have to spend every single version bump
95 +# checking which tests do and do not work.
96 +RESTRICT="test"
97 +
98 +RDEPEND="
99 + >=dev-python/atomicwrites-1.2.0[${PYTHON_USEDEP}]
100 + >=dev-python/chardet-2.0.0[${PYTHON_USEDEP}]
101 + >=dev-util/cookiecutter-1.6.0[${PYTHON_USEDEP}]
102 + >=dev-python/diff-match-patch-20181111[${PYTHON_USEDEP}]
103 + >=dev-python/intervaltree-3.0.2[${PYTHON_USEDEP}]
104 + >=dev-python/jellyfish-0.7[${PYTHON_USEDEP}]
105 + >=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
106 + >=dev-python/keyring-17.0.0[${PYTHON_USEDEP}]
107 + >=dev-python/nbconvert-4.0[${PYTHON_USEDEP}]
108 + >=dev-python/numpydoc-0.6.0[${PYTHON_USEDEP}]
109 + >=dev-python/pexpect-4.4.0[${PYTHON_USEDEP}]
110 + >=dev-python/pickleshare-0.4[${PYTHON_USEDEP}]
111 + >=dev-python/psutil-5.3[${PYTHON_USEDEP}]
112 + >=dev-python/pygments-2.0[${PYTHON_USEDEP}]
113 + >=dev-python/pylint-venv-2.1.1[${PYTHON_USEDEP}]
114 + >=dev-python/python-lsp-black-1.2.0[${PYTHON_USEDEP}]
115 + >=dev-python/pyls-spyder-0.4.0[${PYTHON_USEDEP}]
116 + >=dev-python/pyxdg-0.26[${PYTHON_USEDEP}]
117 + >=dev-python/pyzmq-22.1.0[${PYTHON_USEDEP}]
118 + >=dev-python/qdarkstyle-3.0.2[${PYTHON_USEDEP}]
119 + >=dev-python/qstylizer-0.2.2[${PYTHON_USEDEP}]
120 + >=dev-python/qtawesome-1.2.1[${PYTHON_USEDEP}]
121 + >=dev-python/qtconsole-5.4.0[${PYTHON_USEDEP}]
122 + <dev-python/qtconsole-5.5.0[${PYTHON_USEDEP}]
123 + >=dev-python/QtPy-2.1.0[${PYTHON_USEDEP},svg,webengine]
124 + >=sci-libs/rtree-0.9.7[${PYTHON_USEDEP}]
125 + >=dev-python/sphinx-0.6.6[${PYTHON_USEDEP}]
126 + >=dev-python/spyder-kernels-2.4.0[${PYTHON_USEDEP}]
127 + <dev-python/spyder-kernels-2.5.0[${PYTHON_USEDEP}]
128 + >=dev-python/textdistance-4.2.0[${PYTHON_USEDEP}]
129 + >=dev-python/three-merge-0.1.1[${PYTHON_USEDEP}]
130 + >=dev-python/watchdog-0.10.3[${PYTHON_USEDEP}]
131 +"
132 +
133 +BDEPEND="
134 + test? (
135 + dev-python/cython[${PYTHON_USEDEP}]
136 + dev-python/flaky[${PYTHON_USEDEP}]
137 + dev-python/matplotlib[tk,${PYTHON_USEDEP}]
138 + dev-python/pandas[${PYTHON_USEDEP}]
139 + dev-python/pillow[${PYTHON_USEDEP}]
140 + dev-python/pytest-lazy-fixture[${PYTHON_USEDEP}]
141 + dev-python/pytest-mock[${PYTHON_USEDEP}]
142 + dev-python/pytest-ordering[${PYTHON_USEDEP}]
143 + dev-python/pytest-qt[${PYTHON_USEDEP}]
144 + dev-python/pytest-xvfb[${PYTHON_USEDEP}]
145 + dev-python/pyyaml[${PYTHON_USEDEP}]
146 + dev-python/scipy[${PYTHON_USEDEP}]
147 + dev-python/sympy[${PYTHON_USEDEP}]
148 + )"
149 +
150 +# Based on the courtesy of Arfrever
151 +# This patch removes a call to update-desktop-database during build
152 +# This fails because access is denied to this command during build
153 +PATCHES=(
154 + "${FILESDIR}/${PN}-5.0.0-build.patch"
155 + "${FILESDIR}/${PN}-5.2.0-doc-theme-renamed.patch"
156 + "${FILESDIR}/${PN}-5.4.0-unpin-qdarkstyle.patch"
157 +)
158 +
159 +DOCS=(
160 + "AUTHORS.txt"
161 + "Announcements.md"
162 + "CHANGELOG.md"
163 + "CODE_OF_CONDUCT.md"
164 + "CONTRIBUTING.md"
165 + "NOTICE.txt"
166 + "README.md"
167 + "RELEASE.md"
168 +)
169 +
170 +distutils_enable_tests pytest
171 +distutils_enable_sphinx docs/doc \
172 + dev-python/sphinx-panels \
173 + dev-python/pydata-sphinx-theme \
174 + dev-python/sphinx-multiversion
175 +
176 +python_prepare_all() {
177 + # move docs into workdir
178 + mv ../spyder-docs-${DOCS_PV}* docs || die
179 +
180 + # these dependencies are packaged separately:
181 + # dev-python/spyder-kernels,
182 + # dev-python/python-lsp-server,
183 + # dev-python/qdarkstyle
184 + rm -r external-deps/* || die
185 + # runs against things packaged in external-deps dir
186 + rm conftest.py || die
187 +
188 + # Do not depend on pyqt5<5.16, this dependency is carried by QtPy[pyqt5]
189 + # Do not depend on pyqtwebengine<5.16, this dependency is carried by QtPy[webengine]
190 + # Do not depend on parso and jedi, this is dependency is carried in python-lsp-server
191 + # Do not depend on python-lsp-server, this dependency is carried in pyls-spyder
192 + # Do not depend on ipython, this dependency is carried in spyder-kernels
193 + # The explicit version requirements only make things more complicated, if e.g.
194 + # pyls-spyder gains compatibility with a newer version of python-lsp-server
195 + # in a new release it will take time for this information to propagate into
196 + # the next spyder release. So just remove the dependency and let the other
197 + # ebuilds handle the version requirements to speed things up and prevent
198 + # issues such as Bug 803269.
199 + sed -i \
200 + -e "/'pyqt5[ 0-9<=>.,]*',/d" \
201 + -e "/'pyqtwebengine[ 0-9<=>.,]*',/d" \
202 + -e "/'python-lsp-server\[all\][ 0-9<=>.,]*',/d" \
203 + -e "/'parso[ 0-9<=>.,]*',/d" \
204 + -e "/'jedi[ 0-9<=>.,]*',/d" \
205 + -e "/'pylint[ 0-9<=>.,]*',/d" \
206 + -e "/'ipython[ 0-9<=>.,]*',/d" \
207 + setup.py || die
208 + sed -i \
209 + -e "/^PYLS_REQVER/c\PYLS_REQVER = '>=0.0.1'" \
210 + -e "/^PYLSP_REQVER/c\PYLSP_REQVER = '>=0.0.1'" \
211 + -e "/^PARSO_REQVER/c\PARSO_REQVER = '>=0.0.1'" \
212 + -e "/^JEDI_REQVER/c\JEDI_REQVER = '>=0.0.1'" \
213 + -e "/^PYLINT_REQVER/c\PYLINT_REQVER = '>=0.0.1'" \
214 + -e "/^IPYTHON_REQVER/c\IPYTHON_REQVER = '>=0.0.1'" \
215 + spyder/dependencies.py || die
216 +
217 + # do not check deps, fails because we removed dependencies above
218 + sed -i -e 's:test_dependencies_for_spyder_setup_install_requires_in_sync:_&:' \
219 + spyder/tests/test_dependencies_in_sync.py || die
220 +
221 + # can't check for update, need network
222 + rm spyder/workers/tests/test_update.py || die
223 +
224 + # skip online test
225 + rm spyder/widgets/github/tests/test_github_backend.py || die
226 +
227 + distutils-r1_python_prepare_all
228 +}
229 +
230 +# Calling pytest directly makes the tests freeze after completing even if successful
231 +# Exit code is nonzero even upon success, so can't add || die here test results
232 +# should be checked for success manually
233 +python_test() {
234 + "${EPYTHON}" runtests.py
235 +}
236 +
237 +pkg_postinst() {
238 + xdg_pkg_postinst
239 +
240 + optfeature "2D/3D plotting in the Python and IPython consoles" dev-python/matplotlib
241 + optfeature "View and edit DataFrames and Series in the Variable Explorer" dev-python/pandas
242 + optfeature "View and edit two or three dimensional arrays in the Variable Explorer" dev-python/numpy
243 + optfeature "Symbolic mathematics in the IPython console" dev-python/sympy
244 + optfeature "Import Matlab workspace files in the Variable Explorer" dev-python/scipy
245 + optfeature "Run Cython files in the IPython console" dev-python/cython
246 + optfeature "The hdf5/h5py plugin" dev-python/h5py
247 + optfeature "The line profiler plugin" dev-python/spyder-line-profiler
248 + optfeature "Vim key bindings" dev-python/spyder-vim
249 + optfeature "Unittest support" dev-python/spyder-unittest
250 + optfeature "System terminal inside spyder" dev-python/spyder-terminal
251 + optfeature "Jupyter notebook support" dev-python/spyder-notebook
252 + # spyder-memory-profiler is not compatible with spyder-5.2+ yet
253 + # optfeature "The memory profiler plugin" dev-python/spyder-memory-profiler
254 + # spyder-reports not yet updated to >=spyder-4.0.0
255 + # optfeature "Markdown reports using Pweave" dev-python/spyder-reports
256 + # Plugins with no release yet:
257 + # optfeature "Manage virtual environments and packages" dev-python/spyder-env-manager
258 + # optfeature "VCS (e.g. git) integration" dev-python/spyder-vcs
259 +}