sci-libs/nipype: patched version parsing
Package-Manager: Portage-3.0.0, Repoman-2.3.23 Signed-off-by: Horea Christian <chr@chymera.eu>
This commit is contained in:
parent
ba513a6532
commit
cc7a0602ab
@ -1,3 +1,6 @@
|
||||
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
|
||||
|
@ -1,6 +1,17 @@
|
||||
--- a/nipype/interfaces/base/core.py 2020-08-06 02:07:56.750154463 -0400
|
||||
+++ b/nipype/interfaces/base/core.py 2020-08-07 00:56:11.748074237 -0400
|
||||
@@ -276,6 +276,15 @@
|
||||
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))
|
||||
@ -9,10 +20,26 @@
|
||||
+ except TypeError:
|
||||
+ iflogger.warning(
|
||||
+ 'Nipype is having issues parsing the package version '
|
||||
+ 'for Trait {} ({})'
|
||||
+ 'You may want to check whehter {} is larger than {}'
|
||||
+ .format(name, self.__class__.__name__, version, min_ver)
|
||||
+ 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)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user