commit:     decfc6942ba15bf039dec9834a0ef162da0278db
Author:     Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Wed Mar 25 01:06:58 2020 +0000
Commit:     Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Wed Mar 25 01:06:58 2020 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=decfc694

sci-visualization/fsleyes: new package

Neuroimaging data viewer

Package-Manager: Portage-2.3.95, Repoman-2.3.21
Signed-off-by: Horea Christian <chr <AT> chymera.eu>

 sci-visualization/fsleyes/ChangeLog                | 10 +++
 .../fsleyes/files/fsleyes-0.26.2-fsldir.patch      | 14 ++++
 .../fsleyes/files/fsleyes-0.32.0-coverage.patch    | 13 ++++
 .../fsleyes/files/fsleyes-0.32.0-tests_fail.patch  | 62 +++++++++++++++++
 .../files/fsleyes-0.32.0-tests_timeout.patch       | 61 +++++++++++++++++
 sci-visualization/fsleyes/fsleyes-0.32.0.ebuild    | 79 +++++++++++++++++++++
 sci-visualization/fsleyes/fsleyes-0.32.3.ebuild    | 80 ++++++++++++++++++++++
 sci-visualization/fsleyes/metadata.xml             | 18 +++++
 8 files changed, 337 insertions(+)

diff --git a/sci-visualization/fsleyes/ChangeLog 
b/sci-visualization/fsleyes/ChangeLog
new file mode 100644
index 000000000..293a171cf
--- /dev/null
+++ b/sci-visualization/fsleyes/ChangeLog
@@ -0,0 +1,10 @@
+*fsleyes-0.32.0 (24 Jan 2020)
+
+  24 Jan 2020;  <[email protected]> +files/fsleyes-0.32.0-coverage.patch,
+  +files/fsleyes-0.32.0-tests_fail.patch,
+  +files/fsleyes-0.32.0-tests_timeout.patch, +fsleyes-0.32.0.ebuild,
+  -fsleyes-0.26.2.ebuild, -fsleyes-0.27.3.ebuild, metadata.xml:
+  sci-visualization/fsleyes: new package
+
+  15 Apr 2019;  <[email protected]> fsleyes-0.27.3.ebuild:
+  sci-visualization/fsleyes:

diff --git a/sci-visualization/fsleyes/files/fsleyes-0.26.2-fsldir.patch 
b/sci-visualization/fsleyes/files/fsleyes-0.26.2-fsldir.patch
new file mode 100644
index 000000000..51392f52e
--- /dev/null
+++ b/sci-visualization/fsleyes/files/fsleyes-0.26.2-fsldir.patch
@@ -0,0 +1,14 @@
+--- a/fsleyes/main.py  2018-09-24 17:46:07.756686411 +0200
++++ b/fsleyes/main.py  2018-10-06 14:36:53.328135230 +0200
+@@ -325,11 +325,6 @@
+         app.SetTopWindow(frame)
+         frame.Show()
+ 
+-        # Check that $FSLDIR is set, complain
+-        # to the user if it isn't
+-        if not namespace[0].skipfslcheck:
+-            wx.CallAfter(fslDirWarning, frame)
+-
+         # Check for updates. Ignore point
+         # releases, otherwise users might
+         # get swamped with update notifications.

diff --git a/sci-visualization/fsleyes/files/fsleyes-0.32.0-coverage.patch 
b/sci-visualization/fsleyes/files/fsleyes-0.32.0-coverage.patch
new file mode 100644
index 000000000..089a8d856
--- /dev/null
+++ b/sci-visualization/fsleyes/files/fsleyes-0.32.0-coverage.patch
@@ -0,0 +1,13 @@
+diff --git a/setup.cfg b/setup.cfg
+index fcb594a..dccad97 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -9,7 +9,7 @@ ignore = 
E127,E201,E203,E221,E222,E241,E271,E272,E301,E302,E303,E701,W504
+ 
+ [tool:pytest]
+ testpaths = tests
+-addopts   = -v --cov=fsleyes
++addopts   = -v
+ markers   =
+   overlayclitest: Overlay scene test invoked via FSLeyes command line
+   clitest:        Test invoked via FSLeyes command line

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
new file mode 100644
index 000000000..8b5f2d639
--- /dev/null
+++ b/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_fail.patch
@@ -0,0 +1,62 @@
+diff --git a/tests/actions/test_copyoverlay.py 
b/tests/actions/test_copyoverlay.py
+index 3509ba6..371813e 100644
+--- a/tests/actions/test_copyoverlay.py
++++ b/tests/actions/test_copyoverlay.py
+@@ -19,7 +19,11 @@ import fsleyes.actions.copyoverlay as copyoverlay
+ 
+ from .. import run_with_orthopanel, realYield
+ 
++import pytest
+ 
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_copyImage_3d():
+     run_with_orthopanel(_test_copyImage_3d)
+ def _test_copyImage_3d(panel, overlayList, displayCtx):
+@@ -103,7 +107,9 @@ def _test_copyImage_3d(panel, overlayList, displayCtx):
+     assert np.all(copy[5:25, 5:25, 5:25] == img3d[:, :, :])
+     overlayList.remove(copy)
+ 
+-
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_copyImage_4d():
+     run_with_orthopanel(_test_copyImage_4d)
+ def _test_copyImage_4d(panel, overlayList, displayCtx):
+@@ -220,6 +226,9 @@ def make_rgb():
+     return fslimage.Image(rgb, xform=np.eye(4))
+ 
+ 
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_copyImage_multiValued():
+     run_with_orthopanel(_test_copyImage_multiValued)
+ def _test_copyImage_multiValued(panel, overlayList, displayCtx):
+@@ -281,6 +290,9 @@ def _test_copyImage_multiValued(panel, overlayList, 
displayCtx):
+     overlayList.remove(copy)
+ 
+ 
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_CopyOverlayAction():
+     run_with_orthopanel(_test_CopyOverlayAction)
+ def _test_CopyOverlayAction(panel, overlayList, displayCtx):
+diff --git a/tests/actions/test_newimage.py b/tests/actions/test_newimage.py
+index cfd6b5a..e9c2ff8 100644
+--- a/tests/actions/test_newimage.py
++++ b/tests/actions/test_newimage.py
+@@ -82,6 +82,9 @@ def test_newImage():
+     assert        img.name          == 'whaa'
+ 
+ 
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_NewImageAction():
+     run_with_orthopanel(_test_NewImageAction)
+ 
+

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
new file mode 100644
index 000000000..828252ec4
--- /dev/null
+++ b/sci-visualization/fsleyes/files/fsleyes-0.32.0-tests_timeout.patch
@@ -0,0 +1,61 @@
+diff --git a/tests/actions/test_newimage.py b/tests/actions/test_newimage.py
+index a7d159e4..7bc76fb0 100644
+--- a/tests/actions/test_newimage.py
++++ b/tests/actions/test_newimage.py
+@@ -16,6 +16,7 @@ import fsl.transform.affine as fslaffine
+ import fsleyes.actions.newimage as newimage
+ from .. import run_with_fsleyes, run_with_orthopanel, realYield
+ 
++import pytest
+ 
+ class MockNewImageDialog(object):
+     initOverride = False
+@@ -121,7 +122,9 @@ def _test_NewImageAction(panel, overlayList, displayCtx):
+             overlayList.clear()
+             realYield()
+ 
+-
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_NewImageAction_existing():
+     run_with_orthopanel(_test_NewImageAction_existing)
+
+@@ -156,7 +156,9 @@ def _test_NewImageAction_existing(panel, overlayList, 
displayCtx):
+         assert old.sameSpace(new)
+         assert new.dtype == np.int32
+
+-
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_NewImageDialog():
+     run_with_fsleyes(_test_NewImageDialog)
+
+diff --git a/tests/actions/test_resample.py b/tests/actions/test_resample.py
+index e883002c..ae1741cc 100644
+--- a/tests/actions/test_resample.py
++++ b/tests/actions/test_resample.py
+@@ -25,7 +25,11 @@ from .. import (run_with_fsleyes,
+                 simtext,
+                 simclick)
+
++import pytest
+
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_resample():
+     run_with_orthopanel(_test_resample)
+
+@@ -132,6 +136,9 @@ def _test_resample(panel, overlayList, displayCtx):
+
+
+
[email protected](reason="Known to fail on Gentoo:"
++    "https://github.com/pauldmccarthy/fsleyes/issues/38";
++    )
+ def test_ResampleDialog():
+     run_with_fsleyes(_test_ResampleDialog)
+
+

diff --git a/sci-visualization/fsleyes/fsleyes-0.32.0.ebuild 
b/sci-visualization/fsleyes/fsleyes-0.32.0.ebuild
new file mode 100644
index 000000000..ee52eee60
--- /dev/null
+++ b/sci-visualization/fsleyes/fsleyes-0.32.0.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_6 )
+
+inherit distutils-r1 desktop virtualx
+
+DESCRIPTION="The new FSL image viewer, released with FSL 5.0.10"
+HOMEPAGE="https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/tree/master";
+SRC_URI="
+       
https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/archive/${PV}/${P}.tar.gz
+       https://github.com/pauldmccarthy/fsleyes/archive/${PV}.tar.gz -> 
${P}.tar.gz
+       "
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+       test? (
+               ${RDEPEND}
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/pytest[${PYTHON_USEDEP}]
+               )
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       "
+
+RDEPEND="
+       >=dev-python/fslpy-1.13.2[${PYTHON_USEDEP}]
+       =dev-python/jinja-2*[${PYTHON_USEDEP}]
+       >=dev-python/matplotlib-1.5.1[${PYTHON_USEDEP}]
+       >=dev-python/numpy-1.14.0[${PYTHON_USEDEP}]
+       >=dev-python/pillow-3.4.2[${PYTHON_USEDEP}]
+       >=dev-python/pyopengl-3.1.0[${PYTHON_USEDEP}]
+       >=dev-python/pyopengl_accelerate-3.1.0[${PYTHON_USEDEP}]
+       =dev-python/pyparsing-2*[${PYTHON_USEDEP}]
+       =dev-python/six-1*[${PYTHON_USEDEP}]
+       >=dev-python/wxpython-3.0.2.0[${PYTHON_USEDEP}]
+       >=sci-libs/scipy-0.18[${PYTHON_USEDEP}]
+       =sci-libs/nibabel-2*[${PYTHON_USEDEP}]
+       sci-visualization/fsleyes-widgets[${PYTHON_USEDEP}]
+       sci-visualization/fsleyes-props[${PYTHON_USEDEP}]
+       "
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.26.2-fsldir.patch"
+       "${FILESDIR}/${PN}-0.32.0-coverage.patch"
+       "${FILESDIR}/${PN}-0.32.0-tests_timeout.patch"
+       "${FILESDIR}/${PN}-0.32.0-tests_fail.patch"
+       )
+
+src_prepare() {
+       sed -i -e "s/Pillow>=3.2.0,<6.0/Pillow>=3.2.0/g" requirements.txt
+       distutils-r1_src_prepare
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
+       doicon userdoc/images/fsleyes_icon.png
+       local size
+       for size in 16 32 128 256 512 ; do
+               doicon -s ${size} 
assets/icons/app_icon/${PN}.iconset/icon_${size}x${size}.png
+       done
+       make_desktop_entry fsleyes FSLeyes 
/usr/share/icons/hicolor/128x128/apps/icon_128x128.png
+}
+
+pkg_postinst() {
+       gnome2_icon_cache_update
+}
+pkg_postrm() {
+       gnome2_icon_cache_update
+}
+
+python_test() {
+       virtx pytest -vv || die
+}

diff --git a/sci-visualization/fsleyes/fsleyes-0.32.3.ebuild 
b/sci-visualization/fsleyes/fsleyes-0.32.3.ebuild
new file mode 100644
index 000000000..fccfbf936
--- /dev/null
+++ b/sci-visualization/fsleyes/fsleyes-0.32.3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+
+inherit distutils-r1 desktop virtualx
+
+DESCRIPTION="The new FSL image viewer, released with FSL 5.0.10"
+HOMEPAGE="https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/tree/master";
+SRC_URI="
+       
https://git.fmrib.ox.ac.uk/fsl/fsleyes/fsleyes/-/archive/${PV}/${P}.tar.gz
+       https://github.com/pauldmccarthy/fsleyes/archive/${PV}.tar.gz -> 
${P}.tar.gz
+       "
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+       test? (
+               ${RDEPEND}
+               dev-python/mock[${PYTHON_USEDEP}]
+               dev-python/pytest[${PYTHON_USEDEP}]
+               )
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       "
+
+RDEPEND="
+       >=dev-python/fslpy-1.13.2[${PYTHON_USEDEP}]
+       =dev-python/jinja-2*[${PYTHON_USEDEP}]
+       >=dev-python/matplotlib-1.5.1[${PYTHON_USEDEP}]
+       >=dev-python/numpy-1.14.0[${PYTHON_USEDEP}]
+       >=dev-python/pillow-3.4.2[${PYTHON_USEDEP}]
+       >=dev-python/pyopengl-3.1.0[${PYTHON_USEDEP}]
+       >=dev-python/pyopengl_accelerate-3.1.0[${PYTHON_USEDEP}]
+       =dev-python/pyparsing-2*[${PYTHON_USEDEP}]
+       =dev-python/six-1*[${PYTHON_USEDEP}]
+       >=dev-python/wxpython-3.0.2.0[${PYTHON_USEDEP}]
+       >=sci-libs/scipy-0.18[${PYTHON_USEDEP}]
+       sci-libs/nibabel[${PYTHON_USEDEP}]
+       sci-visualization/fsleyes-widgets[${PYTHON_USEDEP}]
+       sci-visualization/fsleyes-props[${PYTHON_USEDEP}]
+       "
+#=sci-libs/nibabel-2*[${PYTHON_USEDEP}]
+
+PATCHES=(
+       "${FILESDIR}/${PN}-0.26.2-fsldir.patch"
+       "${FILESDIR}/${PN}-0.32.0-coverage.patch"
+       "${FILESDIR}/${PN}-0.32.0-tests_timeout.patch"
+       "${FILESDIR}/${PN}-0.32.0-tests_fail.patch"
+       )
+
+src_prepare() {
+       sed -i -e "s/Pillow>=3.2.0,<6.0/Pillow>=3.2.0/g" requirements.txt
+       distutils-r1_src_prepare
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
+       doicon userdoc/images/fsleyes_icon.png
+       local size
+       for size in 16 32 128 256 512 ; do
+               doicon -s ${size} 
assets/icons/app_icon/${PN}.iconset/icon_${size}x${size}.png
+       done
+       make_desktop_entry fsleyes FSLeyes 
/usr/share/icons/hicolor/128x128/apps/icon_128x128.png
+}
+
+pkg_postinst() {
+       gnome2_icon_cache_update
+}
+pkg_postrm() {
+       gnome2_icon_cache_update
+}
+
+python_test() {
+       virtx pytest -vv || die
+}

diff --git a/sci-visualization/fsleyes/metadata.xml 
b/sci-visualization/fsleyes/metadata.xml
new file mode 100644
index 000000000..153c0c611
--- /dev/null
+++ b/sci-visualization/fsleyes/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>[email protected]</email>
+               <name>Horea Christian</name>
+       </maintainer>
+       <maintainer type="project">
+               <email>[email protected]</email>
+               <name>Gentoo Science Project</name>
+       </maintainer>
+       <longdescription lang="en">
+               FSLeyes is a viewer for 3D and 4D neuroimaging data. It is 
intended as a
+               replacement for the much loved FSLView. FSLeyes offers similar 
functionality
+               to FSLView, and aims to improve and expand upon this 
functionality in many
+               ways.
+       </longdescription>
+</pkgmetadata>

Reply via email to