From nobody Sat Apr 4 17:08:53 2026 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 4fp2B02gjlz6Z4v9; Sat, 04 Apr 2026 17:08:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fp2B00z7tz3HvW; Sat, 04 Apr 2026 17:08:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775322536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NDyj0TA+oovVQcgFg7yJp7TM/441ixPWG+CxFyDY7n4=; b=ENXzHEmtY0BRsSkZ8RYjsCkYoGH/+FYW33qe400IBqq1BYXSqfn3IzU0qdaw8FXW5GRsvS hsMQL/pfs5VrJDBdxURjKAaVgUS+Jt4gRS+PzADwpkMKFum8C8lwQ6ZavTXr8+AP3K/QMC 9aKufSpArvG+ZPsGTaiE7HQ40+Vl+nVFei9VcGo1fqUIzuBBu+uPV0XQYAoUpoGm9La4Qw cV6PnvZOFz9DMBZtoylH1cpj7i3ZhltxPOBMGeMsUUHNq76DKBZzX6jwUmITvXe1/J5NRC QinHqsfnJOCNBUEcqf4GesYhTOvNEVTn/N+BfaiaX0nimgNSFKHeyBVgSztsvQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775322536; a=rsa-sha256; cv=none; b=Nxy9kXzr0JDcFp4g9uVqceq8/UO2mqfz6jwo4AHkhnopYH0biygkegZ9IWaFZDkNwY68aU GJeZKh+B2OEEKAfq/bh+nLSnrUtDpUYIBOJoKqkYbmHNpKhoWDfszZt+0qzZ8tKiJzmeQG y6xp7YVyZzKxv60KsDN/4HF6KR1wBqe08Hj8tcS3ZMVT7tN5f+cPxXtaGmETWxR30mOVHg BuSSEdW7TgdN6jLE0mePWg03ilyTmpNYMJZo5ZQkprQ0Iy2hGEZ/OBe1Jid2C1o9wzRQCU nigVKWgnvVhG5wVgDJFVf28haj6tjrGrlv3sPwopc+jy2nK2J9yIL2f5KWMnPQ== 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=1775322536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=NDyj0TA+oovVQcgFg7yJp7TM/441ixPWG+CxFyDY7n4=; b=Wv7q6Pswc8WYAwcer2KY9R83Sj7XDz85qa1KItvL1tZuQfntBVly0zjDSVraJ4ggaHlpY2 ex3qDbGt7T02CKYPXBt47cr4oh/o2DZ/TEUN8z+MircXjvnoEfQNht3mz3a0M4HNUwljOW u9rYYEdcNEq/ecNeoKCBVfByyOe4fAOr8ITj2xXgZbVBR5/qESOTOoXiuW7trvoye4Ibd9 wYDUiBF7B1iyNYNJMAuIX/UB6NxBv4X1NB8d8HldkzqeuNbKb3yxORZ6u/f8AuEWNf2Jhl yRFRwAFN0sYKiaCZDI9cPVU4B60xJrynAk2NSQqx0UJ1Q4lEWJyyOoUaNqSXuA== Received: from [10.216.0.108] (unknown [188.243.165.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fp29z2WGnz17Nk; Sat, 04 Apr 2026 17:08:55 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Sat, 4 Apr 2026 20:08:53 +0300 From: Dima Panov To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org, Charlie Li Message-ID: In-Reply-To: <69d06e94.335f7.791ef923@gitrepo.freebsd.org> References: <69d06e94.335f7.791ef923@gitrepo.freebsd.org> Subject: git: 28081ef83218 - main - math/py-numpy1: backport configtool/pkg-config file from numpy 2 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="69d145a5_5bd062c2_b5c4" --69d145a5_5bd062c2_b5c4 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline hello! This not fixed Imath and boot-python-libs on -current ( FreeBSD 16.0-CURRENT #0 main-2d843b7c9758: Fri Apr 3 23:38:53 MSK 2026 arm64) :( However, build is fine on releng/15 and releng/14 -- generating PyImath.pc -- Configuring imathnumpy module Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 24, in from . import multiarray File "/usr/local/lib/python3.11/site-packages/numpy/core/multiarray.py", line 10, in from . import overrides File "/usr/local/lib/python3.11/site-packages/numpy/core/overrides.py", line 8, in from numpy.core._multiarray_umath import ( ImportError: /usr/local/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so: Undefined symbol "feraiseexcept" During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/numpy/__init__.py", line 130, in from numpy.__config__ import show as show_config File "/usr/local/lib/python3.11/site-packages/numpy/__config__.py", line 4, in from numpy.core._multiarray_umath import ( File "/usr/local/lib/python3.11/site-packages/numpy/core/__init__.py", line 50, in raise ImportError(msg) ImportError: IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE! Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed. We have compiled some common reasons and troubleshooting tips at: https://numpy.org/devdocs/user/troubleshooting-importerror.html Please note and check the following: * The Python version is: Python3.11 from "/usr/local/bin/python3.11" * The NumPy version is: "1.26.4" and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help. Original error was: /usr/local/lib/python3.11/site-packages/numpy/core/_multiarray_umath.cpython-311.so: Undefined symbol "feraiseexcept" The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.11/site-packages/numpy/__init__.py", line 135, in raise ImportError(msg) from e ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there. -- installing imathnumpy module to lib/python3.11/site-packages On 04.04.2026 04:51, Charlie Li wrote: > The branch main has been updated by vishwin: > > URL: https://cgit.FreeBSD.org/ports/commit/?id=28081ef83218b02fe882f736d7935ea05bb23d68 > > commit 28081ef83218b02fe882f736d7935ea05bb23d68 > Author: Charlie Li > AuthorDate: 2026-04-04 01:47:26 +0000 > Commit: Charlie Li > CommitDate: 2026-04-04 01:47:26 +0000 > > math/py-numpy1: backport configtool/pkg-config file from numpy 2 > > Traditionally the way to query for the numpy C API has been through > distutils/setuptools, but the use of setuptools beyond a PEP-517 > build backend is increasingly discouraged. numpy 2 introduced > numpy-config and a pkg-config file to allow consumer build systems > to better support the use of numpy as a dependency. > > Based on: https://github.com/numpy/numpy/commit/2634f803313f349170c09606d3cc619accd72247 > > Reported by: fluffy > PR: 281470 > --- > math/py-numpy1/Makefile | 1 + > math/py-numpy1/files/patch-numpy___configtool.py | 42 +++++++++++++++++++++ > math/py-numpy1/files/patch-numpy_core_meson.build | 26 +++++++++++++ > math/py-numpy1/files/patch-numpy_core_numpy.pc.in | 10 +++++ > math/py-numpy1/files/patch-numpy_lib_utils.py | 35 +++++++++++++++++ > math/py-numpy1/files/patch-numpy_meson.build | 10 +++++ > .../files/patch-numpy_tests_test__configtool.py | 44 ++++++++++++++++++++++ > math/py-numpy1/files/patch-pyproject.toml | 21 +++++++++++ > 8 files changed, 189 insertions(+) > > diff --git a/math/py-numpy1/Makefile b/math/py-numpy1/Makefile > index e6b83231570d..7873d11b3784 100644 > --- a/math/py-numpy1/Makefile > +++ b/math/py-numpy1/Makefile > @@ -1,5 +1,6 @@ > PORTNAME= numpy > DISTVERSION= 1.26.4 > +PORTREVISION= 1 > CATEGORIES= math python > MASTER_SITES= PYPI \ > https://numpy.org/doc/${DISTVERSION:R}/:doc > diff --git a/math/py-numpy1/files/patch-numpy___configtool.py b/math/py-numpy1/files/patch-numpy___configtool.py > new file mode 100644 > index 000000000000..4d6158efa35a > --- /dev/null > +++ b/math/py-numpy1/files/patch-numpy___configtool.py > @@ -0,0 +1,42 @@ > +--- numpy/_configtool.py.orig 2026-04-04 01:24:53 UTC > ++++ numpy/_configtool.py > +@@ -0,0 +1,39 @@ > ++import argparse > ++from pathlib import Path > ++import sys > ++ > ++from .version import __version__ > ++from .lib.utils import get_include > ++ > ++ > ++def main() -> None: > ++ parser = argparse.ArgumentParser() > ++ parser.add_argument( > ++ "--version", > ++ action="version", > ++ version=__version__, > ++ help="Print the version and exit.", > ++ ) > ++ parser.add_argument( > ++ "--cflags", > ++ action="store_true", > ++ help="Compile flag needed when using the NumPy headers.", > ++ ) > ++ parser.add_argument( > ++ "--pkgconfigdir", > ++ action="store_true", > ++ help=("Print the pkgconfig directory in which `numpy.pc` is stored " > ++ "(useful for setting $PKG_CONFIG_PATH)."), > ++ ) > ++ args = parser.parse_args() > ++ if not sys.argv[1:]: > ++ parser.print_help() > ++ if args.cflags: > ++ print("-I" + get_include()) > ++ if args.pkgconfigdir: > ++ _path = Path(get_include()) / '..' / 'lib' / 'pkgconfig' > ++ print(_path.resolve()) > ++ > ++ > ++if __name__ == "__main__": > ++ main() > diff --git a/math/py-numpy1/files/patch-numpy_core_meson.build b/math/py-numpy1/files/patch-numpy_core_meson.build > new file mode 100644 > index 000000000000..1e0b9cdc79ce > --- /dev/null > +++ b/math/py-numpy1/files/patch-numpy_core_meson.build > @@ -0,0 +1,26 @@ > +--- numpy/core/meson.build.orig 2024-02-05 21:17:48 UTC > ++++ numpy/core/meson.build > +@@ -621,6 +621,23 @@ src_ufunc_api = custom_target('__ufunc_api', > + install_dir: np_dir / 'core/include/numpy' > + ) > + > ++# Write out pkg-config file > ++# ------------------------- > ++ > ++# Note: we can't use Meson's built-in pkgconfig module, because we have to > ++# install numpy.pc within site-packages rather than in its normal location. > ++cdata_numpy_pc = configuration_data() > ++cdata_numpy_pc.set('version', meson.project_version()) > ++ > ++# Note: keep install path in sync with numpy/_configtool.py > ++_numpy_pc = configure_file( > ++ input: 'numpy.pc.in', > ++ output: 'numpy.pc', > ++ configuration: cdata_numpy_pc, > ++ install: true, > ++ install_dir: np_dir / 'core/lib/pkgconfig', > ++ install_tag: 'devel' > ++) > + > + # Set common build flags for C and C++ code > + # ----------------------------------------- > diff --git a/math/py-numpy1/files/patch-numpy_core_numpy.pc.in b/math/py-numpy1/files/patch-numpy_core_numpy.pc.in > new file mode 100644 > index 000000000000..58f33ee87633 > --- /dev/null > +++ b/math/py-numpy1/files/patch-numpy_core_numpy.pc.in > @@ -0,0 +1,10 @@ > +--- numpy/core/numpy.pc.in.orig 2026-04-04 00:13:21 UTC > ++++ numpy/core/numpy.pc.in > +@@ -0,0 +1,7 @@ > ++prefix=${pcfiledir}/../.. > ++includedir=${prefix}/include > ++ > ++Name: numpy > ++Description: NumPy is the fundamental package for scientific computing with Python. > ++Version: @version@ > ++Cflags: -I${includedir} > diff --git a/math/py-numpy1/files/patch-numpy_lib_utils.py b/math/py-numpy1/files/patch-numpy_lib_utils.py > new file mode 100644 > index 000000000000..03914f54522c > --- /dev/null > +++ b/math/py-numpy1/files/patch-numpy_lib_utils.py > @@ -0,0 +1,35 @@ > +--- numpy/lib/utils.py.orig 2024-02-05 21:17:48 UTC > ++++ numpy/lib/utils.py > +@@ -76,18 +76,29 @@ def get_include(): > + """ > + Return the directory that contains the NumPy \\*.h header files. > + > +- Extension modules that need to compile against NumPy should use this > ++ Extension modules that need to compile against NumPy may need to use this > + function to locate the appropriate include directory. > + > + Notes > + ----- > +- When using ``distutils``, for example in ``setup.py``:: > ++ When using ``setuptools``, for example in ``setup.py``:: > + > + import numpy as np > + ... > + Extension('extension_name', ... > +- include_dirs=[np.get_include()]) > ++ include_dirs=[np.get_include()]) > + ... > ++ > ++ Note that a CLI tool ``numpy-config`` was introduced in NumPy 2.0, using > ++ that is likely preferred for build systems other than ``setuptools``:: > ++ > ++ $ numpy-config --cflags > ++ -I/path/to/site-packages/numpy/_core/include > ++ > ++ # Or rely on pkg-config: > ++ $ export PKG_CONFIG_PATH=$(numpy-config --pkgconfigdir) > ++ $ pkg-config --cflags > ++ -I/path/to/site-packages/numpy/_core/include > + > + """ > + import numpy > diff --git a/math/py-numpy1/files/patch-numpy_meson.build b/math/py-numpy1/files/patch-numpy_meson.build > new file mode 100644 > index 000000000000..77cd8dd42fc0 > --- /dev/null > +++ b/math/py-numpy1/files/patch-numpy_meson.build > @@ -0,0 +1,10 @@ > +--- numpy/meson.build.orig 2024-02-05 21:17:48 UTC > ++++ numpy/meson.build > +@@ -215,6 +215,7 @@ python_sources = [ > + '__init__.pxd', > + '__init__.py', > + '__init__.pyi', > ++ '_configtool.py', > + '_distributor_init.py', > + '_globals.py', > + '_pytesttester.py', > diff --git a/math/py-numpy1/files/patch-numpy_tests_test__configtool.py b/math/py-numpy1/files/patch-numpy_tests_test__configtool.py > new file mode 100644 > index 000000000000..306e0f5f677b > --- /dev/null > +++ b/math/py-numpy1/files/patch-numpy_tests_test__configtool.py > @@ -0,0 +1,44 @@ > +--- numpy/tests/test_configtool.py.orig 2026-04-04 00:20:07 UTC > ++++ numpy/tests/test_configtool.py > +@@ -0,0 +1,41 @@ > ++import os > ++import subprocess > ++import sysconfig > ++ > ++import pytest > ++import numpy as np > ++ > ++ > ++is_editable = not bool(np.__path__) > ++numpy_in_sitepackages = sysconfig.get_path('platlib') in np.__file__ > ++# We only expect to have a `numpy-config` available if NumPy was installed via > ++# a build frontend (and not `spin` for example) > ++if not (numpy_in_sitepackages or is_editable): > ++ pytest.skip("`numpy-config` not expected to be installed", > ++ allow_module_level=True) > ++ > ++ > ++def check_numpyconfig(arg): > ++ p = subprocess.run(['numpy-config', arg], capture_output=True, text=True) > ++ p.check_returncode() > ++ return p.stdout.strip() > ++ > ++ > ++def test_configtool_version(): > ++ stdout = check_numpyconfig('--version') > ++ assert stdout == np.__version__ > ++ > ++ > ++def test_configtool_cflags(): > ++ stdout = check_numpyconfig('--cflags') > ++ assert stdout.endswith(os.path.join('numpy', 'core', 'include')) > ++ > ++ > ++def test_configtool_pkgconfigdir(): > ++ stdout = check_numpyconfig('--pkgconfigdir') > ++ assert stdout.endswith(os.path.join('numpy', 'core', 'lib', 'pkgconfig')) > ++ > ++ if not is_editable: > ++ # Also check that the .pc file actually exists (unless we're using an > ++ # editable install, then it'll be hiding in the build dir) > ++ assert os.path.exists(os.path.join(stdout, 'numpy.pc')) > diff --git a/math/py-numpy1/files/patch-pyproject.toml b/math/py-numpy1/files/patch-pyproject.toml > new file mode 100644 > index 000000000000..f26d7ee283c7 > --- /dev/null > +++ b/math/py-numpy1/files/patch-pyproject.toml > @@ -0,0 +1,21 @@ > +--- pyproject.toml.orig 2024-02-05 21:17:48 UTC > ++++ pyproject.toml > +@@ -1,8 +1,8 @@ requires = [ > + [build-system] > + build-backend = "mesonpy" > + requires = [ > +- "Cython>=0.29.34,<3.1", > +- "meson-python>=0.15.0,<0.16.0", > ++ "Cython>=0.29.34", > ++ "meson-python>=0.15.0", > + ] > + > + [project] > +@@ -43,6 +43,7 @@ f2py = 'numpy.f2py.f2py2e:main' > + > + [project.scripts] > + f2py = 'numpy.f2py.f2py2e:main' > ++numpy-config = 'numpy._configtool:main' > + > + [project.entry-points.array_api] > + numpy = 'numpy.array_api' > -- Sincerely, Dima (fluffy@FreeBSD.org, https://t.me/FluffyBSD, @fluffy:matrix-dev.freebsd.org) (desktop, kde, x11, office, ports-secteam)@FreeBSD team --69d145a5_5bd062c2_b5c4 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
hello=21


This not fixed Imath and boot-python-l= ibs on -current ( =46reeBSD 16.0-CURRENT =230 main-2d843b7c9758: =46ri Ap= r 3 23:38:53 MSK 2026 arm64) :(

However, build is fine on releng= /15 and releng/14

-- generating PyImath.pc
-- Configuring im= athnumpy module
Traceback (most recent call last):
=46ile =22/us= r/local/lib/python3.11/site-packages/numpy/core/=5F=5Finit=5F=5F.py=22, l= ine 24, in <module>
from . import multiarray
=46ile =22/u= sr/local/lib/python3.11/site-packages/numpy/core/multiarray.py=22, line 1= 0, in <module>
from . import overrides
=46ile =22/usr/loc= al/lib/python3.11/site-packages/numpy/core/overrides.py=22, line 8, in &l= t;module>
from numpy.core.=5Fmultiarray=5Fumath import (
Impo= rtError: /usr/local/lib/python3.11/site-packages/numpy/core/=5Fmultiarray= =5Fumath.cpython-311.so: Undefined symbol =22feraiseexcept=22

Du= ring handling of the above exception, another exception occurred:
Traceback (most recent call last):
=46ile =22/usr/local/lib/python= 3.11/site-packages/numpy/=5F=5Finit=5F=5F.py=22, line 130, in <module&= gt;
from numpy.=5F=5Fconfig=5F=5F import show as show=5Fconfig
= =46ile =22/usr/local/lib/python3.11/site-packages/numpy/=5F=5Fconfig=5F=5F= .py=22, line 4, in <module>
from numpy.core.=5Fmultiarray=5Fum= ath import (
=46ile =22/usr/local/lib/python3.11/site-packages/numpy= /core/=5F=5Finit=5F=5F.py=22, line 50, in <module>
raise Impor= tError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS =46OR A= DVICE ON HOW TO SOLVE THIS ISSUE=21

Importing the numpy C-extens= ions failed. This error can happen for
many reasons, often due to iss= ues with your setup or how NumPy was
installed.

We have comp= iled some common reasons and troubleshooting tips at:

https://n= umpy.org/devdocs/user/troubleshooting-importerror.html

Please no= te and check the following:

* The Python version is: Python3.11= from =22/usr/local/bin/python3.11=22
* The NumPy version is: =221.2= 6.4=22

and make sure that they are the versions you expect.
= Please carefully study the documentation linked above for further help. <= br>
Original error was: /usr/local/lib/python3.11/site-packages/numpy= /core/=5Fmultiarray=5Fumath.cpython-311.so: Undefined symbol =22feraiseex= cept=22


The above exception was the direct cause of the fol= lowing exception:

Traceback (most recent call last):
=46ile= =22<string>=22, line 1, in <module>
=46ile =22/usr/loca= l/lib/python3.11/site-packages/numpy/=5F=5Finit=5F=5F.py=22, line 135, in= <module>
raise ImportError(msg) from e
ImportError: Error= importing numpy: you should not try to import numpy from
its source= directory; please exit the numpy source tree, and relaunch
your pyt= hon interpreter from there.
-- installing imathnumpy module to lib/py= thon3.11/site-packages



On 04.04.2026 04:51, Charlie Li= wrote:
The branch main has been update= d by vishwin:

URL: https://cgit.=46reeBSD.org/ports/commit/=3Fid= =3D28081ef83218b02fe882f736d7935ea05bb23d68

commit 28081ef83218b= 02fe882f736d7935ea05bb23d68
Author: Charlie Li <vishwin=40=46reeBS= D.org>
AuthorDate: 2026-04-04 01:47:26 +0000
Commit: Charlie L= i <vishwin=40=46reeBSD.org>
CommitDate: 2026-04-04 01:47:26 +00= 00

math/py-numpy1: backport configtool/pkg-config file from nump= y 2

Traditionally the way to query for the numpy C API has been = through
distutils/setuptools, but the use of setuptools beyond a PEP-= 517
build backend is increasingly discouraged. numpy 2 introduced numpy-config and a pkg-config file to allow consumer build systems
t= o better support the use of numpy as a dependency.

Based on: htt= ps://github.com/numpy/numpy/commit/2634f803313f349170c09606d3cc619accd722= 47

Reported by: fluffy
PR: 281470
---
math/py-numpy1= /Makefile =7C 1 +
math/py-numpy1/files/patch-numpy=5F=5F=5Fconfigtool= .py =7C 42 +++++++++++++++++++++
math/py-numpy1/files/patch-numpy=5Fc= ore=5Fmeson.build =7C 26 +++++++++++++
math/py-numpy1/files/patch-num= py=5Fcore=5Fnumpy.pc.in =7C 10 +++++
math/py-numpy1/files/patch-numpy= =5Flib=5Futils.py =7C 35 +++++++++++++++++
math/py-numpy1/files/patch= -numpy=5Fmeson.build =7C 10 +++++
.../files/patch-numpy=5Ftests=5Ftes= t=5F=5Fconfigtool.py =7C 44 ++++++++++++++++++++++
math/py-numpy1/fil= es/patch-pyproject.toml =7C 21 +++++++++++
8 files changed, 189 inser= tions(+)

diff --git a/math/py-numpy1/Makefile b/math/py-numpy1/M= akefile
index e6b83231570d..7873d11b3784 100644
--- a/math/py-num= py1/Makefile
+++ b/math/py-numpy1/Makefile
=40=40 -1,5 +1,6 =40=40=
PORTNAME=3D numpy
DISTVERSION=3D 1.26.4
+PORTREVISION=3D 1 <= br>CATEGORIES=3D math python
MASTER=5FSITES=3D PYPI =5C
https://= numpy.org/doc/=24=7BDISTVERSION:R=7D/:doc
diff --git a/math/py-numpy1= /files/patch-numpy=5F=5F=5Fconfigtool.py b/math/py-numpy1/files/patch-num= py=5F=5F=5Fconfigtool.py
new file mode 100644
index 000000000000.= .4d6158efa35a
--- /dev/null
+++ b/math/py-numpy1/files/patch-nump= y=5F=5F=5Fconfigtool.py
=40=40 -0,0 +1,42 =40=40
+--- numpy/=5Fco= nfigtool.py.orig 2026-04-04 01:24:53 UTC
++++ numpy/=5Fconfigtool.py =
+=40=40 -0,0 +1,39 =40=40
++import argparse
++from pathlib im= port Path
++import sys
++
++from .version import =5F=5Fversio= n=5F=5F
++from .lib.utils import get=5Finclude
++
++
++de= f main() -> None:
++ parser =3D argparse.ArgumentParser()
++ p= arser.add=5Fargument(
++ =22--version=22,
++ action=3D=22version=22= ,
++ version=3D=5F=5Fversion=5F=5F,
++ help=3D=22Print the versio= n and exit.=22,
++ )
++ parser.add=5Fargument(
++ =22--cflags= =22,
++ action=3D=22store=5Ftrue=22,
++ help=3D=22Compile flag ne= eded when using the NumPy headers.=22,
++ )
++ parser.add=5Fargum= ent(
++ =22--pkgconfigdir=22,
++ action=3D=22store=5Ftrue=22, ++ help=3D(=22Print the pkgconfig directory in which =60numpy.pc=60 is s= tored =22
++ =22(useful for setting =24PKG=5FCON=46IG=5FPATH).=22), <= br>++ )
++ args =3D parser.parse=5Fargs()
++ if not sys.argv=5B1:= =5D:
++ parser.print=5Fhelp()
++ if args.cflags:
++ print(=22= -I=22 + get=5Finclude())
++ if args.pkgconfigdir:
++ =5Fpath =3D = Path(get=5Finclude()) / '..' / 'lib' / 'pkgconfig'
++ print(=5Fpath.r= esolve())
++
++
++if =5F=5Fname=5F=5F =3D=3D =22=5F=5Fmain=5F= =5F=22:
++ main()
diff --git a/math/py-numpy1/files/patch-numpy=5F= core=5Fmeson.build b/math/py-numpy1/files/patch-numpy=5Fcore=5Fmeson.buil= d
new file mode 100644
index 000000000000..1e0b9cdc79ce
--- /= dev/null
+++ b/math/py-numpy1/files/patch-numpy=5Fcore=5Fmeson.build =
=40=40 -0,0 +1,26 =40=40
+--- numpy/core/meson.build.orig 2024-02= -05 21:17:48 UTC
++++ numpy/core/meson.build
+=40=40 -621,6 +621,= 23 =40=40 src=5Fufunc=5Fapi =3D custom=5Ftarget('=5F=5Fufunc=5Fapi',
= + install=5Fdir: np=5Fdir / 'core/include/numpy'
+ )
+
++=23 = Write out pkg-config file
++=23 -------------------------
++
= ++=23 Note: we can't use Meson's built-in pkgconfig module, because we ha= ve to
++=23 install numpy.pc within site-packages rather than in its = normal location.
++cdata=5Fnumpy=5Fpc =3D configuration=5Fdata()
= ++cdata=5Fnumpy=5Fpc.set('version', meson.project=5Fversion())
++ ++=23 Note: keep install path in sync with numpy/=5Fconfigtool.py
++= =5Fnumpy=5Fpc =3D configure=5Ffile(
++ input: 'numpy.pc.in',
++ o= utput: 'numpy.pc',
++ configuration: cdata=5Fnumpy=5Fpc,
++ insta= ll: true,
++ install=5Fdir: np=5Fdir / 'core/lib/pkgconfig',
++ i= nstall=5Ftag: 'devel'
++)
+
+ =23 Set common build flags for = C and C++ code
+ =23 -----------------------------------------
di= ff --git a/math/py-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in b/math/p= y-numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in
new file mode 100644 =
index 000000000000..58f33ee87633
--- /dev/null
+++ b/math/py-= numpy1/files/patch-numpy=5Fcore=5Fnumpy.pc.in
=40=40 -0,0 +1,10 =40=40=
+--- numpy/core/numpy.pc.in.orig 2026-04-04 00:13:21 UTC
++++ nu= mpy/core/numpy.pc.in
+=40=40 -0,0 +1,7 =40=40
++prefix=3D=24=7Bpc= filedir=7D/../..
++includedir=3D=24=7Bprefix=7D/include
++
++= Name: numpy
++Description: NumPy is the fundamental package for scien= tific computing with Python.
++Version: =40version=40
++Cflags: -= I=24=7Bincludedir=7D
diff --git a/math/py-numpy1/files/patch-numpy=5F= lib=5Futils.py b/math/py-numpy1/files/patch-numpy=5Flib=5Futils.py
ne= w file mode 100644
index 000000000000..03914f54522c
--- /dev/null=
+++ b/math/py-numpy1/files/patch-numpy=5Flib=5Futils.py
=40=40 -= 0,0 +1,35 =40=40
+--- numpy/lib/utils.py.orig 2024-02-05 21:17:48 UTC=
++++ numpy/lib/utils.py
+=40=40 -76,18 +76,29 =40=40 def get=5Fi= nclude():
+ =22=22=22
+ Return the directory that contains the Nu= mPy =5C=5C*.h header files.
+
+- Extension modules that need to c= ompile against NumPy should use this
++ Extension modules that need t= o compile against NumPy may need to use this
+ function to locate the= appropriate include directory.
+
+ Notes
+ -----
+- When= using =60=60distutils=60=60, for example in =60=60setup.py=60=60::
+= + When using =60=60setuptools=60=60, for example in =60=60setup.py=60=60:= :
+
+ import numpy as np
+ ...
+ Extension('extension=5Fn= ame', ...
+- include=5Fdirs=3D=5Bnp.get=5Finclude()=5D)
++ includ= e=5Fdirs=3D=5Bnp.get=5Finclude()=5D)
+ ...
++
++ Note that a = CLI tool =60=60numpy-config=60=60 was introduced in NumPy 2.0, using
= ++ that is likely preferred for build systems other than =60=60setuptools= =60=60::
++
++ =24 numpy-config --cflags
++ -I/path/to/site-p= ackages/numpy/=5Fcore/include
++
++ =23 Or rely on pkg-config: ++ =24 export PKG=5FCON=46IG=5FPATH=3D=24(numpy-config --pkgconfigdir) =
++ =24 pkg-config --cflags
++ -I/path/to/site-packages/numpy/=5Fc= ore/include
+
+ =22=22=22
+ import numpy
diff --git a/mat= h/py-numpy1/files/patch-numpy=5Fmeson.build b/math/py-numpy1/files/patch-= numpy=5Fmeson.build
new file mode 100644
index 000000000000..77cd= 8dd42fc0
--- /dev/null
+++ b/math/py-numpy1/files/patch-numpy=5Fm= eson.build
=40=40 -0,0 +1,10 =40=40
+--- numpy/meson.build.orig 2= 024-02-05 21:17:48 UTC
++++ numpy/meson.build
+=40=40 -215,6 +215= ,7 =40=40 python=5Fsources =3D =5B
+ '=5F=5Finit=5F=5F.pxd',
+ '=5F= =5Finit=5F=5F.py',
+ '=5F=5Finit=5F=5F.pyi',
++ '=5Fconfigtool.py= ',
+ '=5Fdistributor=5Finit.py',
+ '=5Fglobals.py',
+ '=5Fpyt= esttester.py',
diff --git a/math/py-numpy1/files/patch-numpy=5Ftests=5F= test=5F=5Fconfigtool.py b/math/py-numpy1/files/patch-numpy=5Ftests=5Ftest= =5F=5Fconfigtool.py
new file mode 100644
index 000000000000..306e= 0f5f677b
--- /dev/null
+++ b/math/py-numpy1/files/patch-numpy=5Ft= ests=5Ftest=5F=5Fconfigtool.py
=40=40 -0,0 +1,44 =40=40
+--- nump= y/tests/test=5Fconfigtool.py.orig 2026-04-04 00:20:07 UTC
++++ numpy/= tests/test=5Fconfigtool.py
+=40=40 -0,0 +1,41 =40=40
++import os =
++import subprocess
++import sysconfig
++
++import pytest=
++import numpy as np
++
++
++is=5Feditable =3D not bool(= np.=5F=5Fpath=5F=5F)
++numpy=5Fin=5Fsitepackages =3D sysconfig.get=5F= path('platlib') in np.=5F=5Ffile=5F=5F
++=23 We only expect to have a= =60numpy-config=60 available if NumPy was installed via
++=23 a buil= d frontend (and not =60spin=60 for example)
++if not (numpy=5Fin=5Fsi= tepackages or is=5Feditable):
++ pytest.skip(=22=60numpy-config=60 no= t expected to be installed=22,
++ allow=5Fmodule=5Flevel=3DTrue)
= ++
++
++def check=5Fnumpyconfig(arg):
++ p =3D subprocess.run= (=5B'numpy-config', arg=5D, capture=5Foutput=3DTrue, text=3DTrue)
++ = p.check=5Freturncode()
++ return p.stdout.strip()
++
++
+= +def test=5Fconfigtool=5Fversion():
++ stdout =3D check=5Fnumpyconfig= ('--version')
++ assert stdout =3D=3D np.=5F=5Fversion=5F=5F
++ <= br>++
++def test=5Fconfigtool=5Fcflags():
++ stdout =3D check=5Fn= umpyconfig('--cflags')
++ assert stdout.endswith(os.path.join('numpy'= , 'core', 'include'))
++
++
++def test=5Fconfigtool=5Fpkgconf= igdir():
++ stdout =3D check=5Fnumpyconfig('--pkgconfigdir')
++ a= ssert stdout.endswith(os.path.join('numpy', 'core', 'lib', 'pkgconfig')) =
++
++ if not is=5Feditable:
++ =23 Also check that the .pc fi= le actually exists (unless we're using an
++ =23 editable install, th= en it'll be hiding in the build dir)
++ assert os.path.exists(os.path= .join(stdout, 'numpy.pc'))
diff --git a/math/py-numpy1/files/patch-py= project.toml b/math/py-numpy1/files/patch-pyproject.toml
new file mod= e 100644
index 000000000000..f26d7ee283c7
--- /dev/null
+++ b= /math/py-numpy1/files/patch-pyproject.toml
=40=40 -0,0 +1,21 =40=40 <= br>+--- pyproject.toml.orig 2024-02-05 21:17:48 UTC
++++ pyproject.to= ml
+=40=40 -1,8 +1,8 =40=40 requires =3D =5B
+ =5Bbuild-system=5D=
+ build-backend =3D =22mesonpy=22
+ requires =3D =5B
+- =22C= ython>=3D0.29.34,<3.1=22,
+- =22meson-python>=3D0.15.0,<0= .16.0=22,
++ =22Cython>=3D0.29.34=22,
++ =22meson-python>=3D= 0.15.0=22,
+ =5D
+
+ =5Bproject=5D
+=40=40 -43,6 +43,7 =40= =40 f2py =3D 'numpy.f2py.f2py2e:main'
+
+ =5Bproject.scripts=5D <= br>+ f2py =3D 'numpy.f2py.f2py2e:main'
++numpy-config =3D 'numpy.=5Fc= onfigtool:main'
+
+ =5Bproject.entry-points.array=5Fapi=5D
+ = numpy =3D 'numpy.array=5Fapi'


--
Sincerely= ,
Dima (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD, =40fluffy:m= atrix-dev.freebsd.org)
(desktop, kde, x11, office, ports-secteam)=40=46= reeBSD team

--69d145a5_5bd062c2_b5c4--