aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroo Ono <hiroo.ono+freebsd@gmail.com>2026-08-05 01:03:38 +0000
committerWen Heping <wen@FreeBSD.org>2026-08-05 01:03:38 +0000
commit994e4902425e5b20c1586184692f92b62800fba4 (patch)
tree0236fd071bd46c2b480d05eae2c287db62369e30
parentce18da5f70b92fa31181781168af28aeb10f045b (diff)
astro/py-astropy-helpers: Fix build with python-3.12
PR: 296703 Reported by: hiroo.ono+freebsd@gmail.com
-rw-r--r--astro/py-astropy-helpers/Makefile2
-rw-r--r--astro/py-astropy-helpers/files/patch-astropy__helpers_utils.py22
2 files changed, 23 insertions, 1 deletions
diff --git a/astro/py-astropy-helpers/Makefile b/astro/py-astropy-helpers/Makefile
index db61915ba4bb..70a9becff9e9 100644
--- a/astro/py-astropy-helpers/Makefile
+++ b/astro/py-astropy-helpers/Makefile
@@ -1,6 +1,6 @@
PORTNAME= astropy-helpers
DISTVERSION= 4.0.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= astro
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
diff --git a/astro/py-astropy-helpers/files/patch-astropy__helpers_utils.py b/astro/py-astropy-helpers/files/patch-astropy__helpers_utils.py
new file mode 100644
index 000000000000..a3c60836a420
--- /dev/null
+++ b/astro/py-astropy-helpers/files/patch-astropy__helpers_utils.py
@@ -0,0 +1,22 @@
+--- astropy_helpers/utils.py.orig 2026-08-05 00:59:43 UTC
++++ astropy_helpers/utils.py
+@@ -1,7 +1,7 @@ import contextlib
+ # Licensed under a 3-clause BSD style license - see LICENSE.rst
+
+ import contextlib
+-import imp
++import importlib
+ import os
+ import sys
+ import glob
+@@ -54,9 +54,8 @@ def get_numpy_include_path():
+ import builtins
+ if hasattr(builtins, '__NUMPY_SETUP__'):
+ del builtins.__NUMPY_SETUP__
+- import imp
+ import numpy
+- imp.reload(numpy)
++ impportlib.reload(numpy)
+
+ try:
+ numpy_include = numpy.get_include()