1
0
Fork 0

sci-libs/nipype: pushed to Gentoo Science

https://gitweb.gentoo.org/proj/sci.git/commit/?id=7766d151243230173d21865e85dbf7c71853f8ad
This commit is contained in:
Horea Christian 2020-09-25 05:26:54 -04:00
parent 0a1bf51a85
commit 221254f0f9
7 changed files with 0 additions and 253 deletions

View File

@ -1,22 +0,0 @@
08 Aug 2020; <chymera@gentoo.org> files/nipype-1.5.0-version_check.patch:
sci-libs/nipype: patched version parsing
07 Aug 2020; <chymera@gentoo.org> +files/nipype-1.5.0-version_check.patch,
nipype-1.5.0.ebuild:
sci-libs/nipype: patching out autofail on misparsed version check
27 Jul 2020; <chymera@gentoo.org> +files/98nipype, nipype-1.5.0.ebuild:
sci-libs/nipype: disabled etelemetry functionality
*nipype-1.5.0 (17 Jul 2020)
17 Jul 2020; <chymera@gentoo.org> +nipype-1.5.0.ebuild:
sci-libs/nipype: version bump 1.5.0
31 Mar 2020; <chymera@gentoo.org> nipype-1.4.2.ebuild:
sci-libs/nipype: fixed test suite
*nipype-1.4.2 (30 Mar 2020)
30 Mar 2020; <chymera@gentoo.org> +nipype-1.4.2.ebuild:
sci-libs/nipype:

View File

@ -1,2 +0,0 @@
DIST nipype-1.4.2.tar.gz 2823870 SHA256 935b660bfd81f773bd5291a90a921cc226f62940950c094be04f080f6c69501d SHA512 f913d1a63105ccb8392adfdba5ec52b3e5ce0c9ad145b062f6e551a811602b77a52f1f6e89d9d5ff366e9b063f0ab965cfbd6ae5f68a79e25e8970e1a864901c WHIRLPOOL 21ab8554f8d5eec5fc7d5d9e137eef24f11443b805c892cb1a3dfbd5f34030a08c39300778337eb5499b011a2049c3c2724988d2210356d0d5525f4758b33fdf
DIST nipype-1.5.0.tar.gz 2735317 SHA256 dbbe74ac99740da749350a6957326bd78d6ba388694b0c09cd92575f111576af SHA512 eb11096a090855278c3e76ffe9643ab4de046a017511ba51f59448fd8cf9d67a4f6c552acbbbdd38065cfb456c24fd21299cf698fa05c5be507524622f28ac85 WHIRLPOOL ffb44ddcf8d6e6a2d0e4179c89f15d59edc86b5188232e8b170a1352d51aa4b3806313d0a1c6215aced0d916252e27c2d8cc97d5ef94d12ac0418681fae0a40b

View File

@ -1 +0,0 @@
export NIPYPE_NO_ET=1

View File

@ -1,45 +0,0 @@
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)):

View File

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>horea.christ@gmail.com</email>
<name>Horea Christian</name>
</maintainer>
<maintainer type="project">
<email>sci@gentoo.org</email>
<name>Gentoo Science Project</name>
</maintainer>
<longdescription lang="en">
Nipype, an open-source, community-developed initiative under the
umbrella of NiPy, is a Python project that provides a uniform interface
to existing neuroimaging software and facilitates interaction between
these packages within a single workflow. Nipype provides an environment
that encourages interactive exploration of algorithms from different
packages (e.g., SPM, FSL, FreeSurfer, Camino, MRtrix, MNE, AFNI, Slicer),
eases the design of workflows within and between packages, and reduces
the learning curve necessary to use different packages. Nipype is
creating a collaborative platform for neuroimaging software development
in a high-level language and addressing limitations of existing pipeline systems.
</longdescription>
<upstream>
<remote-id type="github">nipy/nipype</remote-id>
<remote-id type="sourceforge">nipy</remote-id>
</upstream>
</pkgmetadata>

View File

@ -1,66 +0,0 @@
# 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/simplejson[${PYTHON_USEDEP}]
dev-python/traits[${PYTHON_USEDEP}]
sci-libs/scipy[${PYTHON_USEDEP}]
"
#etelemetry and neurdflib
src_prepare() {
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() {
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\
}

View File

@ -1,89 +0,0 @@
# 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/simplejson[${PYTHON_USEDEP}]
dev-python/traits[${PYTHON_USEDEP}]
sci-libs/scipy[${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
}