git: 994e4902425e - main - astro/py-astropy-helpers: Fix build with python-3.12
Wen Heping <[email protected]> Wed, 05 Aug 2026 01:05:10 +0000
| Newsgroups | gmane.os.freebsd.devel.cvs.ports |
|---|---|
| Message-ID | <[email protected]> |
The branch main has been updated by wen: URL: https://cgit.FreeBSD.org/ports/commit/?id=994e4902425e5b20c1586184692f92b62800fba4 commit 994e4902425e5b20c1586184692f92b62800fba4 Author: Hiroo Ono <[email protected]> AuthorDate: 2026-08-05 01:03:38 +0000 Commit: Wen Heping <[email protected]> CommitDate: 2026-08-05 01:03:38 +0000 astro/py-astropy-helpers: Fix build with python-3.12 PR: 296703 Reported by: [email protected] --- astro/py-astropy-helpers/Makefile | 2 +- .../files/patch-astropy__helpers_utils.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) 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()