commit:     1d9f52f78d06e93d2fa28efaff395e19c17f063a
Author:     Horea Christian <chr <AT> chymera <DOT> eu>
AuthorDate: Mon Dec 11 15:59:30 2023 +0000
Commit:     Horea Christian <horea.christ <AT> gmail <DOT> com>
CommitDate: Mon Dec 11 15:59:30 2023 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=1d9f52f7

sci-libs/nipype: PEP517 fixes and revbump

Signed-off-by: Horea Christian <chr <AT> chymera.eu>

 .../nipype/files/nipype-1.8.4-no_etelemetry.patch  | 50 ++++++++++++++++++++++
 sci-libs/nipype/nipype-1.8.4-r1.ebuild             |  1 +
 ...pype-1.8.4-r1.ebuild => nipype-1.8.4-r2.ebuild} |  5 ++-
 3 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/sci-libs/nipype/files/nipype-1.8.4-no_etelemetry.patch 
b/sci-libs/nipype/files/nipype-1.8.4-no_etelemetry.patch
new file mode 100644
index 000000000..b5c223422
--- /dev/null
+++ b/sci-libs/nipype/files/nipype-1.8.4-no_etelemetry.patch
@@ -0,0 +1,50 @@
+diff --git a/nipype/__init__.py b/nipype/__init__.py
+index 06084e823..2e42dcbce 100644
+--- a/nipype/__init__.py
++++ b/nipype/__init__.py
+@@ -73,23 +73,6 @@ from .interfaces import (
+ )
+ 
+ 
+-def check_latest_version(raise_exception=False):
+-    """
+-    Check for the latest version of the library.
+-
+-    Parameters
+-    ----------
+-    raise_exception: bool
+-        Raise a RuntimeError if a bad version is being used
+-    """
+-    import etelemetry
+-
+-    logger = logging.getLogger("nipype.utils")
+-    return etelemetry.check_available_version(
+-        "nipy/nipype", __version__, logger, raise_exception
+-    )
+-
+-
+ # Run telemetry on import for interactive sessions, such as IPython, Jupyter 
notebooks, Python REPL
+ if config.getboolean("execution", "check_version"):
+     import __main__
+@@ -98,4 +81,4 @@ if config.getboolean("execution", "check_version"):
+         from .interfaces.base import BaseInterface
+ 
+         if BaseInterface._etelemetry_version_data is None:
+-            BaseInterface._etelemetry_version_data = check_latest_version() 
or "n/a"
++            BaseInterface._etelemetry_version_data = "n/a"
+diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py
+index c8099be63..f7770dbfc 100644
+--- a/nipype/interfaces/base/core.py
++++ b/nipype/interfaces/base/core.py
+@@ -183,10 +183,9 @@ class BaseInterface(Interface):
+             config.getboolean("execution", "check_version")
+             and "NIPYPE_NO_ET" not in os.environ
+         ):
+-            from ... import check_latest_version
+ 
+             if BaseInterface._etelemetry_version_data is None:
+-                BaseInterface._etelemetry_version_data = 
check_latest_version() or "n/a"
++                BaseInterface._etelemetry_version_data = "n/a"
+ 
+         if not self.input_spec:
+             raise Exception("No input_spec in class: %s" % 
self.__class__.__name__)

diff --git a/sci-libs/nipype/nipype-1.8.4-r1.ebuild 
b/sci-libs/nipype/nipype-1.8.4-r1.ebuild
index 8214ccff4..7c2e801ff 100644
--- a/sci-libs/nipype/nipype-1.8.4-r1.ebuild
+++ b/sci-libs/nipype/nipype-1.8.4-r1.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=8
 
+DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{10..11} )
 PYTHON_REQ_USE="threads(+),sqlite"
 

diff --git a/sci-libs/nipype/nipype-1.8.4-r1.ebuild 
b/sci-libs/nipype/nipype-1.8.4-r2.ebuild
similarity index 93%
copy from sci-libs/nipype/nipype-1.8.4-r1.ebuild
copy to sci-libs/nipype/nipype-1.8.4-r2.ebuild
index 8214ccff4..4c3da70b3 100644
--- a/sci-libs/nipype/nipype-1.8.4-r1.ebuild
+++ b/sci-libs/nipype/nipype-1.8.4-r2.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=8
 
+DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{10..11} )
 PYTHON_REQ_USE="threads(+),sqlite"
 
@@ -14,7 +15,7 @@ SRC_URI="https://github.com/nipy/nipype/archive/${PV}.tar.gz 
-> ${P}.tar.gz"
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~amd64"
+KEYWORDS="~amd64 ~x86"
 IUSE="test"
 RESTRICT="!test? ( test )"
 
@@ -45,10 +46,12 @@ RDEPEND="
 
 PATCHES=(
        "${FILESDIR}/${PN}-1.8.4-dependency_compatibility.patch"
+       "${FILESDIR}/${PN}-1.8.4-no_etelemetry.patch"
 )
 
 src_prepare() {
        # Remove etelemetry
+       # Doing this separately since the file is affected by another patch.
        sed -i '/"etelemetry/d' nipype/info.py requirements.txt || die
 
        # Mark failing tests

Reply via email to