aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-libs/nipype/Manifest2
-rw-r--r--sci-libs/nipype/files/98nipype1
-rw-r--r--sci-libs/nipype/files/nipype-1.5.0-version_check.patch45
-rw-r--r--sci-libs/nipype/nipype-1.1.1-r2.ebuild2
-rw-r--r--sci-libs/nipype/nipype-1.4.2.ebuild (renamed from sci-libs/nipype/nipype-1.1.1-r1.ebuild)21
-rw-r--r--sci-libs/nipype/nipype-1.5.0.ebuild89
6 files changed, 149 insertions, 11 deletions
diff --git a/sci-libs/nipype/Manifest b/sci-libs/nipype/Manifest
index 8b0a0f7e6..cbf353bd7 100644
--- a/sci-libs/nipype/Manifest
+++ b/sci-libs/nipype/Manifest
@@ -1 +1,3 @@
DIST nipype-1.1.1.tar.gz 3353518 BLAKE2B 509b6c2b18aab8c8ddfad3ca4ac87401caf0608ee566edecaa20a4329a3bfd9d67dae730ac45342600b4026b66c5043d753d09e5230269d3fc4b946d049ad11e SHA512 dba749ff3b53dfe19992a27f9ad9aedcd360b51b3bf7233bf4b83387ae7181425b27ef43d23747553e9f8eb368b6769d6bec62650e1303ec353dde4de84f1769
+DIST nipype-1.4.2.tar.gz 2823870 BLAKE2B 3af3a5e45fada174908723afd8c747575cba4c8489cd894fdced68a5b10b0638f871c600df921b61a4e809c43ea3b827539410ed713f14829d60f207d5bd8cfd SHA512 f913d1a63105ccb8392adfdba5ec52b3e5ce0c9ad145b062f6e551a811602b77a52f1f6e89d9d5ff366e9b063f0ab965cfbd6ae5f68a79e25e8970e1a864901c
+DIST nipype-1.5.0.tar.gz 2735317 BLAKE2B d618714b15defde52325bac32a80449846b448d1c141a21f9d950976c8c89624d714dbab10b4cd99fe20d4eb99ceb4095ebc6ddc567f57b3803e2c16ffda155a SHA512 eb11096a090855278c3e76ffe9643ab4de046a017511ba51f59448fd8cf9d67a4f6c552acbbbdd38065cfb456c24fd21299cf698fa05c5be507524622f28ac85
diff --git a/sci-libs/nipype/files/98nipype b/sci-libs/nipype/files/98nipype
new file mode 100644
index 000000000..c848f7c2a
--- /dev/null
+++ b/sci-libs/nipype/files/98nipype
@@ -0,0 +1 @@
+export NIPYPE_NO_ET=1
diff --git a/sci-libs/nipype/files/nipype-1.5.0-version_check.patch b/sci-libs/nipype/files/nipype-1.5.0-version_check.patch
new file mode 100644
index 000000000..8b7f11c63
--- /dev/null
+++ b/sci-libs/nipype/files/nipype-1.5.0-version_check.patch
@@ -0,0 +1,45 @@
+From b4d57d7ca4359b0990636bbc6091c49706c6ff39 Mon Sep 17 00:00:00 2001
+From: Horea Christian <chr@chymera.eu>
+Date: Fri, 7 Aug 2020 01:12:38 -0400
+Subject: [PATCH] ENH: no more auto-failing on misparsed versions
+
+---
+ nipype/interfaces/base/core.py | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py
+index 82da393a84..1e626fe1b5 100644
+--- a/nipype/interfaces/base/core.py
++++ b/nipype/interfaces/base/core.py
+@@ -276,6 +276,15 @@ def _check_version_requirements(self, trait_object, raise_exception=True):
+ version = LooseVersion(str(self.version))
+ for name in names:
+ min_ver = LooseVersion(str(trait_object.traits()[name].min_ver))
++ try:
++ min_ver > version
++ except TypeError:
++ iflogger.warning(
++ 'Nipype is having issues parsing the package version '
++ f'for Trait {name} ({self.__class__.__name__})'
++ f'You may want to check whether {version} is larger than {min_ver}'
++ )
++ continue
+ if min_ver > version:
+ unavailable_traits.append(name)
+ if not isdefined(getattr(trait_object, name)):
+@@ -293,6 +302,15 @@ def _check_version_requirements(self, trait_object, raise_exception=True):
+ version = LooseVersion(str(self.version))
+ for name in names:
+ max_ver = LooseVersion(str(trait_object.traits()[name].max_ver))
++ try:
++ max_ver > version
++ except TypeError:
++ iflogger.warning(
++ 'Nipype is having issues parsing the package version '
++ f'for Trait {name} ({self.__class__.__name__})'
++ f'You may want to check whether {version} is smaller than {max_ver}'
++ )
++ continue
+ if max_ver < version:
+ unavailable_traits.append(name)
+ if not isdefined(getattr(trait_object, name)):
diff --git a/sci-libs/nipype/nipype-1.1.1-r2.ebuild b/sci-libs/nipype/nipype-1.1.1-r2.ebuild
index 39427865a..528967695 100644
--- a/sci-libs/nipype/nipype-1.1.1-r2.ebuild
+++ b/sci-libs/nipype/nipype-1.1.1-r2.ebuild
@@ -25,7 +25,7 @@ DEPEND="
sci-libs/nibabel[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
- <=dev-python/pytest-4.6.9[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
${RDEPEND}
)
"
diff --git a/sci-libs/nipype/nipype-1.1.1-r1.ebuild b/sci-libs/nipype/nipype-1.4.2.ebuild
index 435268f9c..dd1b5e1f0 100644
--- a/sci-libs/nipype/nipype-1.1.1-r1.ebuild
+++ b/sci-libs/nipype/nipype-1.4.2.ebuild
@@ -18,14 +18,12 @@ KEYWORDS="~amd64 ~x86"
IUSE="test"
DEPEND="
- dev-python/future[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
dev-python/prov[${PYTHON_USEDEP}]
- dev-python/setuptools[${PYTHON_USEDEP}]
sci-libs/nibabel[${PYTHON_USEDEP}]
test? (
dev-python/mock[${PYTHON_USEDEP}]
- <=dev-python/pytest-4.6.9[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
${RDEPEND}
)
"
@@ -34,27 +32,30 @@ DEPEND="
RDEPEND="
>=dev-python/click-6.6[${PYTHON_USEDEP}]
+ dev-python/filelock[${PYTHON_USEDEP}]
dev-python/networkx[${PYTHON_USEDEP}]
dev-python/packaging[${PYTHON_USEDEP}]
dev-python/pydot[${PYTHON_USEDEP}]
dev-python/pydotplus[${PYTHON_USEDEP}]
- dev-python/pygraphviz[${PYTHON_USEDEP}]
dev-python/python-dateutil[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
dev-python/simplejson[${PYTHON_USEDEP}]
dev-python/traits[${PYTHON_USEDEP}]
- dev-python/scipy[${PYTHON_USEDEP}]
"
+#etelemetry and neurdflib
src_prepare() {
- sed -i\
- -e "/'pytest>=%s' % PYTEST_MIN_VERSION,/d"\
- -e "/'pytest-xdist',$/d"\
- nipype/info.py || die
+ sed -i \
+ -e "/def test_no_et(tmp_path):/i@pytest.mark.skip('Known to fail by upstream: https://github.com/nipy/nipype/issues/3196#issuecomment-606003186')" \
+ nipype/tests/test_nipype.py || die
+ sed -i \
+ -e "/def test_fslversion():/i@pytest.mark.skip('Known to fail by upstream: https://github.com/nipy/nipype/issues/3196#issuecomment-605997462')" \
+ nipype/interfaces/fsl/tests/test_base.py || die
default
}
python_test() {
- pytest -vv\
+ NIPYPE_NO_ET=1 pytest -vv\
|| die
# Upstream test configuration fails
#-c nipype/pytest.ini\
diff --git a/sci-libs/nipype/nipype-1.5.0.ebuild b/sci-libs/nipype/nipype-1.5.0.ebuild
new file mode 100644
index 000000000..1c3357c1a
--- /dev/null
+++ b/sci-libs/nipype/nipype-1.5.0.ebuild
@@ -0,0 +1,89 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_REQ_USE="threads(+),sqlite"
+
+inherit distutils-r1
+
+DESCRIPTION="Neuroimaging in Python: Pipelines and Interfaces"
+HOMEPAGE="http://nipy.sourceforge.net/nipype/"
+SRC_URI="https://github.com/nipy/nipype/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/prov[${PYTHON_USEDEP}]
+ sci-libs/nibabel[${PYTHON_USEDEP}]
+ test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/pytest[${PYTHON_USEDEP}]
+ ${RDEPEND}
+ )
+"
+# Dependency disabled as upstream test configuration which requires it fails
+#dev-python/pytest-xdist[${PYTHON_USEDEP}]
+
+RDEPEND="
+ >=dev-python/click-6.6[${PYTHON_USEDEP}]
+ dev-python/filelock[${PYTHON_USEDEP}]
+ dev-python/networkx[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/pydot[${PYTHON_USEDEP}]
+ dev-python/pydotplus[${PYTHON_USEDEP}]
+ dev-python/python-dateutil[${PYTHON_USEDEP}]
+ >=dev-python/rdflib-5.0.0[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ dev-python/traits[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}"-version_check.patch
+)
+
+src_prepare() {
+ # Remove etelemetry
+ sed -i '/"etelemetry/d' nipype/info.py || die
+
+ # Mark failing tests
+ sed -i \
+ -e "/def test_no_et(tmp_path):/i@pytest.mark.skip('Known to fail by upstream: https://github.com/nipy/nipype/issues/3196#issuecomment-606003186')" \
+ nipype/tests/test_nipype.py || die
+ sed -i \
+ -e "/def test_fslversion():/i@pytest.mark.skip('Known to fail by upstream: https://github.com/nipy/nipype/issues/3196#issuecomment-605997462')" \
+ nipype/interfaces/fsl/tests/test_base.py || die
+ default
+}
+
+python_install_all() {
+ distutils-r1_python_install_all
+ doenvd "${FILESDIR}/98nipype"
+}
+
+python_test() {
+ # Setting environment variable to disable etelemetry version check:
+ # https://github.com/nipy/nipype/issues/3196#issuecomment-605980044
+ NIPYPE_NO_ET=1 pytest -vv\
+ || die
+ # Upstream test configuration fails
+ #-c nipype/pytest.ini\
+ #--doctest-modules nipype\
+ #--cov nipype\
+ #--cov-config .coveragerc\
+ #--cov-report xml:cov.xml\
+}
+
+pkg_postinst() {
+ echo
+ einfo "Please run the following commands if you"
+ einfo "intend to use nipype from an existing shell:"
+ einfo "source /etc/profile"
+ echo
+}