git: 1fcc7d54e0bd - main - astro/py-astropy-healpix: update 2.0.0 → 2.0.1

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 20 Sep 2026 18:16:51 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1fcc7d54e0bddd89030a7d55c344c5272a5b3507

commit 1fcc7d54e0bddd89030a7d55c344c5272a5b3507
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-09-20 16:54:47 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-09-20 18:16:43 +0000

    astro/py-astropy-healpix: update 2.0.0 → 2.0.1
---
 astro/py-astropy-healpix/Makefile                   | 14 ++++++++------
 astro/py-astropy-healpix/distinfo                   |  6 +++---
 .../files/patch-astropy__healpix___core.c           | 13 -------------
 astro/py-astropy-healpix/files/patch-pyproject.toml |  4 ++++
 astro/py-astropy-healpix/files/sitecustomize.py     | 21 +++++++++++++++++++++
 5 files changed, 36 insertions(+), 22 deletions(-)

diff --git a/astro/py-astropy-healpix/Makefile b/astro/py-astropy-healpix/Makefile
index bad185c4a61d..4665c0f88c7a 100644
--- a/astro/py-astropy-healpix/Makefile
+++ b/astro/py-astropy-healpix/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	astropy-healpix
-PORTVERSION=	2.0.0
+PORTVERSION=	2.0.1
 CATEGORIES=	astro python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}extension-helpers>=1.3:astro/py-extension-helpers@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}numpy>=2.0.0,1:math/py-numpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \
-		${PY_SETUPTOOLS}
+		${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}astropy>=6.1:astro/py-astropy@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}numpy>=2.0.0,1:math/py-numpy@${PY_FLAVOR}
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hypothesis>0:devel/py-hypothesis@${PY_FLAVOR} \
@@ -28,14 +28,16 @@ USE_PYTHON=	pep517 autoplist pytest
 
 CFLAGS+=	-std=gnu11
 
-TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
-TEST_WRKSRC=	${WRKSRC}/astropy_healpix/tests
+# Work around astro/py-astropy vs NumPy 2.3 test-time import regressions.
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${FILESDIR}:${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+TEST_ARGS=	--disable-plugin-autoload ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:S/-/_/}/tests
+TEST_WRKSRC=	${WRKDIR}
 
 post-install:
 	@${STRIP_CMD} \
 		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:S/-/_/}/_core.*.so \
 		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME:S/-/_/}/compiler_version.*.so
 
-# tests fail to run, see https://github.com/astropy/astropy-healpix/issues/272
+# tests as of 2.0.1: 125 passed, 1 skipped in 0.58s
 
 .include <bsd.port.mk>
diff --git a/astro/py-astropy-healpix/distinfo b/astro/py-astropy-healpix/distinfo
index ed10446fd2e6..a6f94f266e2e 100644
--- a/astro/py-astropy-healpix/distinfo
+++ b/astro/py-astropy-healpix/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1783414793
-SHA256 (astropy_healpix-2.0.0.tar.gz) = 6ce7646dc5b1c09a7ed24b1f23d3e2fce8e3570387220d26a24487ab001b3b0b
-SIZE (astropy_healpix-2.0.0.tar.gz) = 112064
+TIMESTAMP = 1789892448
+SHA256 (astropy_healpix-2.0.1.tar.gz) = 0e3f1c94064c45da779900cb90c938df7aef99a924abb23eeb893b16540e77e6
+SIZE (astropy_healpix-2.0.1.tar.gz) = 112256
diff --git a/astro/py-astropy-healpix/files/patch-astropy__healpix___core.c b/astro/py-astropy-healpix/files/patch-astropy__healpix___core.c
deleted file mode 100644
index e697fbc2897d..000000000000
--- a/astro/py-astropy-healpix/files/patch-astropy__healpix___core.c
+++ /dev/null
@@ -1,13 +0,0 @@
--- workaround for https://github.com/astropy/astropy-healpix/issues/321
-
---- astropy_healpix/_core.c.orig	2026-07-07 20:08:05 UTC
-+++ astropy_healpix/_core.c
-@@ -310,7 +310,7 @@ static void bit_scan_reverse_loop(
-         int64_t  in = *(int64_t *) &args[0][i * steps[0]];
-         int    *out =  (int *)     &args[1][i * steps[1]];
-         #if __has_include(<stdbit.h>)
--            *out = 63 - stdc_leading_zeros(in);
-+            *out = 63 - stdc_leading_zeros((unsigned long long)in);
-         #elif defined(_MSC_VER)
-             unsigned long index;
-             if (_BitScanReverse64(&index, in))
diff --git a/astro/py-astropy-healpix/files/patch-pyproject.toml b/astro/py-astropy-healpix/files/patch-pyproject.toml
index 6dbad15d40bd..8e48ffe69577 100644
--- a/astro/py-astropy-healpix/files/patch-pyproject.toml
+++ b/astro/py-astropy-healpix/files/patch-pyproject.toml
@@ -1,3 +1,7 @@
+-- Relax the setuptools build requirement to match the ports tree version.
+-- Needed because FreeBSD currently ships devel/py-setuptools 63.1.0 and this port builds fine with it.
+-- This is a local compatibility patch for the FreeBSD ports framework.
+
 --- pyproject.toml.orig	2026-07-07 09:01:45 UTC
 +++ pyproject.toml
 @@ -1,6 +1,6 @@
diff --git a/astro/py-astropy-healpix/files/sitecustomize.py b/astro/py-astropy-healpix/files/sitecustomize.py
new file mode 100644
index 000000000000..24455ad0cf82
--- /dev/null
+++ b/astro/py-astropy-healpix/files/sitecustomize.py
@@ -0,0 +1,21 @@
+import numpy
+
+if not hasattr(numpy, "in1d"):
+    numpy.in1d = numpy.isin
+
+try:
+    from numpy.lib import _function_base_impl
+except Exception:
+    _function_base_impl = None
+
+if _function_base_impl is not None and not hasattr(_function_base_impl, "_check_interpolation_as_method"):
+    def _check_interpolation_as_method(method, interpolation, fname):
+        if interpolation is None:
+            return method
+        if method != "linear" and interpolation != method:
+            raise TypeError(
+                f"Cannot pass both 'method' and deprecated 'interpolation' to {fname}()"
+            )
+        return interpolation
+
+    _function_base_impl._check_interpolation_as_method = _check_interpolation_as_method