Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-visualization/fsleyes/files/, sci-visualization/fsleyes/
Date: Mon, 24 Jan 2022 16:06:51
Message-Id: 1643040285.66f50726fab28cb5569f231431368c9779c1249d.andrewammerlaan@gentoo
1 commit: 66f50726fab28cb5569f231431368c9779c1249d
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 24 16:04:45 2022 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 24 16:04:45 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=66f50726
7
8 sci-visualization/fsleyes: bump to 1.3.3
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
12
13 .../fsleyes/files/fsleyes-0.32.0-coverage.patch | 13 ----
14 .../fsleyes/files/fsleyes-0.32.0-tests_fail.patch | 62 ---------------
15 .../files/fsleyes-0.32.0-tests_timeout.patch | 61 ---------------
16 sci-visualization/fsleyes/fsleyes-0.32.3.ebuild | 80 --------------------
17 sci-visualization/fsleyes/fsleyes-0.34.2.ebuild | 88 ----------------------
18 sci-visualization/fsleyes/fsleyes-1.3.3.ebuild | 65 ++++++++++++++++
19 6 files changed, 65 insertions(+), 304 deletions(-)
20
21 diff --git a/sci-visualization/fsleyes/files/fsleyes-0.32.0-coverage.patch b/sci-visualization/fsleyes/files/fsleyes-0.32.0-coverage.patch
22 deleted file mode 100644
23 index 089a8d856..000000000
24 --- a/sci-visualization/fsleyes/files/fsleyes-0.32.0-coverage.patch
25 +++ /dev/null
26 @@ -1,13 +0,0 @@
27 -diff --git a/setup.cfg b/setup.cfg
28 -index fcb594a..dccad97 100644
29 ---- a/setup.cfg
30 -+++ b/setup.cfg
31 -@@ -9,7 +9,7 @@ ignore = E127,E201,E203,E221,E222,E241,E271,E272,E301,E302,E303,E701,W504
32 -
33 - [tool:pytest]
34 - testpaths = tests
35 --addopts = -v --cov=fsleyes
36 -+addopts = -v
37 - markers =
38 - overlayclitest: Overlay scene test invoked via FSLeyes command line
39 - clitest: Test invoked via FSLeyes command line
40
41 diff --git a/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_fail.patch b/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_fail.patch
42 deleted file mode 100644
43 index 8b5f2d639..000000000
44 --- a/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_fail.patch
45 +++ /dev/null
46 @@ -1,62 +0,0 @@
47 -diff --git a/tests/actions/test_copyoverlay.py b/tests/actions/test_copyoverlay.py
48 -index 3509ba6..371813e 100644
49 ---- a/tests/actions/test_copyoverlay.py
50 -+++ b/tests/actions/test_copyoverlay.py
51 -@@ -19,7 +19,11 @@ import fsleyes.actions.copyoverlay as copyoverlay
52 -
53 - from .. import run_with_orthopanel, realYield
54 -
55 -+import pytest
56 -
57 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
58 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
59 -+ )
60 - def test_copyImage_3d():
61 - run_with_orthopanel(_test_copyImage_3d)
62 - def _test_copyImage_3d(panel, overlayList, displayCtx):
63 -@@ -103,7 +107,9 @@ def _test_copyImage_3d(panel, overlayList, displayCtx):
64 - assert np.all(copy[5:25, 5:25, 5:25] == img3d[:, :, :])
65 - overlayList.remove(copy)
66 -
67 --
68 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
69 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
70 -+ )
71 - def test_copyImage_4d():
72 - run_with_orthopanel(_test_copyImage_4d)
73 - def _test_copyImage_4d(panel, overlayList, displayCtx):
74 -@@ -220,6 +226,9 @@ def make_rgb():
75 - return fslimage.Image(rgb, xform=np.eye(4))
76 -
77 -
78 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
79 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
80 -+ )
81 - def test_copyImage_multiValued():
82 - run_with_orthopanel(_test_copyImage_multiValued)
83 - def _test_copyImage_multiValued(panel, overlayList, displayCtx):
84 -@@ -281,6 +290,9 @@ def _test_copyImage_multiValued(panel, overlayList, displayCtx):
85 - overlayList.remove(copy)
86 -
87 -
88 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
89 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
90 -+ )
91 - def test_CopyOverlayAction():
92 - run_with_orthopanel(_test_CopyOverlayAction)
93 - def _test_CopyOverlayAction(panel, overlayList, displayCtx):
94 -diff --git a/tests/actions/test_newimage.py b/tests/actions/test_newimage.py
95 -index cfd6b5a..e9c2ff8 100644
96 ---- a/tests/actions/test_newimage.py
97 -+++ b/tests/actions/test_newimage.py
98 -@@ -82,6 +82,9 @@ def test_newImage():
99 - assert img.name == 'whaa'
100 -
101 -
102 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
103 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
104 -+ )
105 - def test_NewImageAction():
106 - run_with_orthopanel(_test_NewImageAction)
107 -
108 -
109
110 diff --git a/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_timeout.patch b/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_timeout.patch
111 deleted file mode 100644
112 index 828252ec4..000000000
113 --- a/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_timeout.patch
114 +++ /dev/null
115 @@ -1,61 +0,0 @@
116 -diff --git a/tests/actions/test_newimage.py b/tests/actions/test_newimage.py
117 -index a7d159e4..7bc76fb0 100644
118 ---- a/tests/actions/test_newimage.py
119 -+++ b/tests/actions/test_newimage.py
120 -@@ -16,6 +16,7 @@ import fsl.transform.affine as fslaffine
121 - import fsleyes.actions.newimage as newimage
122 - from .. import run_with_fsleyes, run_with_orthopanel, realYield
123 -
124 -+import pytest
125 -
126 - class MockNewImageDialog(object):
127 - initOverride = False
128 -@@ -121,7 +122,9 @@ def _test_NewImageAction(panel, overlayList, displayCtx):
129 - overlayList.clear()
130 - realYield()
131 -
132 --
133 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
134 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
135 -+ )
136 - def test_NewImageAction_existing():
137 - run_with_orthopanel(_test_NewImageAction_existing)
138 -
139 -@@ -156,7 +156,9 @@ def _test_NewImageAction_existing(panel, overlayList, displayCtx):
140 - assert old.sameSpace(new)
141 - assert new.dtype == np.int32
142 -
143 --
144 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
145 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
146 -+ )
147 - def test_NewImageDialog():
148 - run_with_fsleyes(_test_NewImageDialog)
149 -
150 -diff --git a/tests/actions/test_resample.py b/tests/actions/test_resample.py
151 -index e883002c..ae1741cc 100644
152 ---- a/tests/actions/test_resample.py
153 -+++ b/tests/actions/test_resample.py
154 -@@ -25,7 +25,11 @@ from .. import (run_with_fsleyes,
155 - simtext,
156 - simclick)
157 -
158 -+import pytest
159 -
160 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
161 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
162 -+ )
163 - def test_resample():
164 - run_with_orthopanel(_test_resample)
165 -
166 -@@ -132,6 +136,9 @@ def _test_resample(panel, overlayList, displayCtx):
167 -
168 -
169 -
170 -+@×××××××××××.skip(reason="Known to fail on Gentoo:"
171 -+ "https://github.com/pauldmccarthy/fsleyes/issues/38"
172 -+ )
173 - def test_ResampleDialog():
174 - run_with_fsleyes(_test_ResampleDialog)
175 -
176 -
177
178 diff --git a/sci-visualization/fsleyes/fsleyes-0.32.3.ebuild b/sci-visualization/fsleyes/fsleyes-0.32.3.ebuild
179 deleted file mode 100644
180 index 5c98f015d..000000000
181 --- a/sci-visualization/fsleyes/fsleyes-0.32.3.ebuild
182 +++ /dev/null
183 @@ -1,80 +0,0 @@
184 -# Copyright 1999-2021 Gentoo Authors
185 -# Distributed under the terms of the GNU General Public License v2
186 -
187 -EAPI=7
188 -
189 -PYTHON_COMPAT=( python3_{7,8} )
190 -
191 -inherit distutils-r1 desktop virtualx
192 -
193 -DESCRIPTION="The new FSL image viewer, released with FSL 5.0.10"
194 -HOMEPAGE="https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/tree/master"
195 -SRC_URI="
196 - https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/archive/${PV}/${P}.tar.gz
197 - https://github.com/pauldmccarthy/fsleyes/archive/${PV}.tar.gz -> ${P}.tar.gz
198 - "
199 -
200 -LICENSE="Apache-2.0"
201 -SLOT="0"
202 -KEYWORDS="~amd64 ~x86"
203 -IUSE="test"
204 -
205 -DEPEND="
206 - test? (
207 - ${RDEPEND}
208 - dev-python/mock[${PYTHON_USEDEP}]
209 - dev-python/pytest[${PYTHON_USEDEP}]
210 - )
211 - dev-python/setuptools[${PYTHON_USEDEP}]
212 - "
213 -
214 -RDEPEND="
215 - >=dev-python/fslpy-1.13.2[${PYTHON_USEDEP}]
216 - =dev-python/jinja-2*[${PYTHON_USEDEP}]
217 - >=dev-python/matplotlib-1.5.1[${PYTHON_USEDEP}]
218 - >=dev-python/numpy-1.14.0[${PYTHON_USEDEP}]
219 - >=dev-python/pillow-3.4.2[${PYTHON_USEDEP}]
220 - >=dev-python/pyopengl-3.1.0[${PYTHON_USEDEP}]
221 - >=dev-python/pyopengl_accelerate-3.1.0[${PYTHON_USEDEP}]
222 - =dev-python/pyparsing-2*[${PYTHON_USEDEP}]
223 - =dev-python/six-1*[${PYTHON_USEDEP}]
224 - >=dev-python/wxpython-3.0.2.0[${PYTHON_USEDEP}]
225 - >=dev-python/scipy-0.18[${PYTHON_USEDEP}]
226 - sci-libs/nibabel[${PYTHON_USEDEP}]
227 - sci-visualization/fsleyes-widgets[${PYTHON_USEDEP}]
228 - sci-visualization/fsleyes-props[${PYTHON_USEDEP}]
229 - "
230 -#=sci-libs/nibabel-2*[${PYTHON_USEDEP}]
231 -
232 -PATCHES=(
233 - "${FILESDIR}/${PN}-0.26.2-fsldir.patch"
234 - "${FILESDIR}/${PN}-0.32.0-coverage.patch"
235 - "${FILESDIR}/${PN}-0.32.0-tests_timeout.patch"
236 - "${FILESDIR}/${PN}-0.32.0-tests_fail.patch"
237 - )
238 -
239 -src_prepare() {
240 - sed -i -e "s/Pillow>=3.2.0,<6.0/Pillow>=3.2.0/g" requirements.txt
241 - distutils-r1_src_prepare
242 -}
243 -
244 -python_install_all() {
245 - distutils-r1_python_install_all
246 - doicon userdoc/images/fsleyes_icon.png
247 - local size
248 - for size in 16 32 128 256 512 ; do
249 - doicon -s ${size} assets/icons/app_icon/${PN}.iconset/icon_${size}x${size}.png
250 - done
251 - make_desktop_entry fsleyes FSLeyes /usr/share/icons/hicolor/128x128/apps/icon_128x128.png
252 -}
253 -
254 -pkg_postinst() {
255 - gnome2_icon_cache_update
256 -}
257 -pkg_postrm() {
258 - gnome2_icon_cache_update
259 -}
260 -
261 -python_test() {
262 - virtx pytest -vv || die
263 -}
264
265 diff --git a/sci-visualization/fsleyes/fsleyes-0.34.2.ebuild b/sci-visualization/fsleyes/fsleyes-0.34.2.ebuild
266 deleted file mode 100644
267 index 36533c5a8..000000000
268 --- a/sci-visualization/fsleyes/fsleyes-0.34.2.ebuild
269 +++ /dev/null
270 @@ -1,88 +0,0 @@
271 -# Copyright 1999-2021 Gentoo Authors
272 -# Distributed under the terms of the GNU General Public License v2
273 -
274 -EAPI=7
275 -
276 -PYTHON_COMPAT=( python3_{7,8} )
277 -DISTUTILS_USE_SETUPTOOLS=rdepend
278 -
279 -inherit xdg distutils-r1 desktop virtualx
280 -
281 -DESCRIPTION="The new FSL image viewer, released with FSL 5.0.10"
282 -HOMEPAGE="https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/tree/master"
283 -SRC_URI="
284 - https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/archive/${PV}/${P}.tar.gz
285 - https://github.com/pauldmccarthy/fsleyes/archive/${PV}.tar.gz -> ${P}.tar.gz
286 - "
287 -
288 -LICENSE="Apache-2.0"
289 -SLOT="0"
290 -# hard masked dependency >=dev-python/fslpy-3.1
291 -KEYWORDS=""
292 -
293 -DEPEND="
294 - test? (
295 - ${RDEPEND}
296 - dev-python/mock[${PYTHON_USEDEP}]
297 - )
298 - "
299 -
300 -RDEPEND="
301 - >=dev-python/fslpy-3.1[${PYTHON_USEDEP}]
302 - =dev-python/jinja-2*[${PYTHON_USEDEP}]
303 - >=dev-python/matplotlib-1.5.1[${PYTHON_USEDEP}]
304 - >=dev-python/numpy-1.14.0[${PYTHON_USEDEP}]
305 - >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
306 - >=dev-python/pyopengl-3.1.0[${PYTHON_USEDEP}]
307 - >=dev-python/pyopengl_accelerate-3.1.0[${PYTHON_USEDEP}]
308 - =dev-python/pyparsing-2*[${PYTHON_USEDEP}]
309 - =dev-python/six-1*[${PYTHON_USEDEP}]
310 - >=dev-python/wxpython-3.0.2.0[${PYTHON_USEDEP}]
311 - >=dev-python/scipy-0.18[${PYTHON_USEDEP}]
312 - >=sci-libs/nibabel-2.3[${PYTHON_USEDEP}]
313 - >=sci-visualization/fsleyes-widgets-0.8.4[${PYTHON_USEDEP}]
314 - >=sci-visualization/fsleyes-props-1.6.7[${PYTHON_USEDEP}]
315 - "
316 -
317 -PATCHES=(
318 - "${FILESDIR}/${PN}-0.26.2-fsldir.patch"
319 - "${FILESDIR}/${PN}-0.32.0-tests_timeout.patch"
320 - "${FILESDIR}/${PN}-0.32.0-tests_fail.patch"
321 - )
322 -
323 -distutils_enable_tests pytest
324 -
325 -python_prepare_all() {
326 - # do not depend on pytest-cov
327 - sed -i -e '/addopts/d' setup.cfg || die
328 -
329 - # Fatal Python error: Segmentation fault
330 - sed -i -e 's:test_crop:_&:' \
331 - tests/test_ortho_cropmode.py || die
332 - sed -i -e 's:test_fillSelection:_&:' \
333 - tests/test_ortho_editmode.py || die
334 -
335 - # KeyError: 'Unknown atlas ID: harvardoxford-cortical'
336 - sed -i -e 's:test_atlaspanel_toggleOverlay:_&:' \
337 - tests/test_atlaspanel.py || die
338 -
339 - # This hangs forever
340 - sed -i -e 's:test_lightbox:_&:' \
341 - tests/test_layouts.py || die
342 -
343 - distutils-r1_python_prepare_all
344 -}
345 -
346 -python_install_all() {
347 - distutils-r1_python_install_all
348 - doicon userdoc/images/fsleyes_icon.png
349 - local size
350 - for size in 16 32 128 256 512 ; do
351 - newicon -s ${size} assets/icons/app_icon/${PN}.iconset/icon_${size}x${size}.png "${PN}.png"
352 - done
353 - make_desktop_entry fsleyes FSLeyes "${PN}"
354 -}
355 -
356 -python_test() {
357 - virtx pytest -vv || die
358 -}
359
360 diff --git a/sci-visualization/fsleyes/fsleyes-1.3.3.ebuild b/sci-visualization/fsleyes/fsleyes-1.3.3.ebuild
361 new file mode 100644
362 index 000000000..ac86c16fd
363 --- /dev/null
364 +++ b/sci-visualization/fsleyes/fsleyes-1.3.3.ebuild
365 @@ -0,0 +1,65 @@
366 +# Copyright 1999-2022 Gentoo Authors
367 +# Distributed under the terms of the GNU General Public License v2
368 +
369 +EAPI=8
370 +
371 +PYTHON_COMPAT=( python3_{8..9} )
372 +
373 +inherit xdg distutils-r1 desktop virtualx
374 +
375 +DESCRIPTION="The new FSL image viewer, released with FSL 5.0.10"
376 +HOMEPAGE="https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/tree/master"
377 +SRC_URI="
378 + https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/archive/${PV}/${P}.tar.gz
379 + https://github.com/pauldmccarthy/fsleyes/archive/${PV}.tar.gz -> ${P}.tar.gz
380 +"
381 +
382 +LICENSE="Apache-2.0"
383 +SLOT="0"
384 +KEYWORDS="~amd64"
385 +
386 +RDEPEND="
387 + >=dev-python/fslpy-3.6[${PYTHON_USEDEP}]
388 + >=dev-python/jinja-2[${PYTHON_USEDEP}]
389 + >=dev-python/matplotlib-1.5.1[${PYTHON_USEDEP}]
390 + >=dev-python/numpy-1.14.0[${PYTHON_USEDEP}]
391 + >=dev-python/pillow-3.2.0[${PYTHON_USEDEP}]
392 + >=dev-python/pyopengl-3.1.0[${PYTHON_USEDEP}]
393 + >=dev-python/pyopengl_accelerate-3.1.0[${PYTHON_USEDEP}]
394 + =dev-python/pyparsing-2*[${PYTHON_USEDEP}]
395 + >=dev-python/wxpython-4[${PYTHON_USEDEP}]
396 + >=dev-python/scipy-0.18[${PYTHON_USEDEP}]
397 + >=sci-libs/nibabel-2.3[${PYTHON_USEDEP}]
398 + >=sci-visualization/fsleyes-widgets-0.12[${PYTHON_USEDEP}]
399 + >=sci-visualization/fsleyes-props-1.7.2[${PYTHON_USEDEP}]
400 + "
401 +
402 +PATCHES=(
403 + "${FILESDIR}/${PN}-0.26.2-fsldir.patch"
404 +)
405 +
406 +distutils_enable_tests pytest
407 +distutils_enable_sphinx userdoc dev-python/sphinx_rtd_theme
408 +
409 +python_prepare_all() {
410 + # do not depend on pytest-cov
411 + sed -i -e '/addopts/d' setup.cfg || die
412 +
413 + distutils-r1_python_prepare_all
414 +}
415 +
416 +python_install_all() {
417 + distutils-r1_python_install_all
418 + doicon -s 48 fsleyes/assets/linux/hicolor/48x48/apps/*.png
419 + domenu fsleyes/assets/linux/*.desktop
420 + insinto /usr/share/metainfo
421 + doins fsleyes/assets/linux/*.appdata.xml
422 + local size
423 + for size in 16 32 128 256 512 ; do
424 + newicon -s ${size} fsleyes/assets/icons/app_icon/${PN}.iconset/icon_${size}x${size}.png "${PN}.png"
425 + done
426 +}
427 +
428 +python_test() {
429 + virtx epytest
430 +}