From nobody Tue Dec 12 21:14:19 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SqWZg73tqz53Gyt; Tue, 12 Dec 2023 21:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SqWZg5Q5Vz3KVB; Tue, 12 Dec 2023 21:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702415659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQlAdiQf7D9XkoXW2A0zGf0mSJBi56V9mTN51y4rsUI=; b=N9f5ovvYOlc5VuE/DFx1hRJw9qnHQIu88VLcVSBauOtxy6ZKFSsMIrJYWE/xKc2wmFe2w3 ZHTj548gCkQgjcaEXA8L88Bxm+u2xUybUgpy40zDVTTTMyUysLiifOvXT2DBZZLhK3OrSY QKqx74uLZxTCItvy0N40uhBkiH7oTzSKeyktCJxwouQY5fs/yA6hsKcK3NIDUU37kVwt8F 7Lm0M7VqJySJWjOEjUgiGsLQKtKRWZ1l+cb/+MFjo1fFrw8Pfu+JXZ4hsnD1UGyf4ltzof e4AnQQZgYj/R9Q1lnQK9z1xiRM7Xq/wwul6x00qtc4uk+7Vn7KMy9GrY1HEuNw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702415659; a=rsa-sha256; cv=none; b=Xy817meElAtT3KlEfUCYd7wHkBUc0SvwF4ED/92tF5QjPoCDk5G/ClDZ5OiXemXkLJL5xH vtR/B5vv3y9RViYp28mrUGa0j7woD1IiNIsy501VGl0qJnjcfz9zS3zPd6d2KMj0XzdJLP lvccvzXhmG71LOwMGQkjD3sAgMq2vnOWBH/9A4wIPqbMKr7Xr+SUYxiXZyCPXaLX0LHR/Q gch9WTnNyTw6qys8Tv4E3muI3TfzJ399g7VxLcoH6lx3NuDtZGcpRp5HolwRxnlTO0dL5v O7pgF7GrEWpH90r2a/wCW754RLLrbp4kD3GiDfmKDXrEjE2FZRRGo6OLKIgKWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702415659; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GQlAdiQf7D9XkoXW2A0zGf0mSJBi56V9mTN51y4rsUI=; b=k0MdzLnrhBx3FsXSCErcET/GgL1VfaOPS+gLoJg6ZyjXese6j2Ls3gBgT2NjHp66Si9WU6 Klg8UOS4/igTYsQbJzRUFUtDJxCYqH4jjskWFiyuaR55+GlAI/104X5O3xBHxk/aIV/Rhz nQSCynxVeOiLC7nDRqrzi7O4moVVtbw8sjGCNX282uTxliJrcgaOAXpBBY0+5E/JqWFAqf XO9LL9R53T5mg/Z66LN+ejPe8SCz/W3yTqpOmkhWPgSU70Kqe2/YiyIDKO1ALbh5mvEtFG o/VL7DDMdtzqQzMA56CRoXSNxYjIfv1TbGfDiZ5VrLEmWXpnm27zazQ/HvhbLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SqWZg4WG5zWsN; Tue, 12 Dec 2023 21:14:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BCLEJGg088801; Tue, 12 Dec 2023 21:14:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BCLEJc3088798; Tue, 12 Dec 2023 21:14:19 GMT (envelope-from git) Date: Tue, 12 Dec 2023 21:14:19 GMT Message-Id: <202312122114.3BCLEJc3088798@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: 5e276b8b14bd - main - science/py-nibabel: Fix the failing test List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e276b8b14bdcb637637955eab78baf76e435297 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=5e276b8b14bdcb637637955eab78baf76e435297 commit 5e276b8b14bdcb637637955eab78baf76e435297 Author: Yuri Victorovich AuthorDate: 2023-12-12 20:50:32 +0000 Commit: Yuri Victorovich CommitDate: 2023-12-12 21:14:13 +0000 science/py-nibabel: Fix the failing test --- science/py-nibabel/Makefile | 1 + science/py-nibabel/files/patch-fix-tests | 37 ++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/science/py-nibabel/Makefile b/science/py-nibabel/Makefile index 3fbc19195c17..90dbc234add4 100644 --- a/science/py-nibabel/Makefile +++ b/science/py-nibabel/Makefile @@ -1,5 +1,6 @@ PORTNAME= nibabel DISTVERSION= 5.2.0 +PORTREVISION= 1 CATEGORIES= science python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/science/py-nibabel/files/patch-fix-tests b/science/py-nibabel/files/patch-fix-tests new file mode 100644 index 000000000000..1a3db66036b6 --- /dev/null +++ b/science/py-nibabel/files/patch-fix-tests @@ -0,0 +1,37 @@ +- fix for the failing test from https://github.com/nipy/nibabel/issues/1285#issuecomment-1852612513 + +diff --git nibabel/pkg_info.py nibabel/pkg_info.py +index 7e816939..7232806a 100644 +--- nibabel/pkg_info.py ++++ nibabel/pkg_info.py +@@ -1,6 +1,7 @@ + from __future__ import annotations + + import sys ++from contextlib import suppress + from subprocess import run + + from packaging.version import Version +@@ -102,14 +103,16 @@ def pkg_commit_hash(pkg_path: str | None = None) -> tuple[str, str]: + ver = Version(__version__) + if ver.local is not None and ver.local.startswith('g'): + return 'installation', ver.local[1:8] +- # maybe we are in a repository +- proc = run( +- ('git', 'rev-parse', '--short', 'HEAD'), +- capture_output=True, +- cwd=pkg_path, +- ) +- if proc.stdout: +- return 'repository', proc.stdout.decode().strip() ++ # maybe we are in a repository, but consider that we may not have git ++ with suppress(FileNotFoundError): ++ proc = run( ++ ('git', 'rev-parse', '--short', 'HEAD'), ++ capture_output=True, ++ cwd=pkg_path, ++ ) ++ if proc.stdout: ++ return 'repository', proc.stdout.decode().strip() ++ + return '(none found)', ''