Skip to content

Commit 232bdbd

Browse files
committed
numpy@2.1.1_py312: patch numpy source to include missing header for macos sequoia and tahoe
1 parent 2e7a213 commit 232bdbd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Formula/numpy@2.1.1_py312.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class NumpyAT211Py312 < Formula
44
url "https://files.pythonhosted.org/packages/59/5f/9003bb3e632f2b58f5e3a3378902dcc73c5518070736c6740fe52454e8e1/numpy-2.1.1.tar.gz"
55
sha256 "d0cf7d55b1051387807405b3898efafa862997b4cba8aa5dbe657be794afeafd"
66
license "BSD-3-Clause"
7-
revision 2
7+
revision 3
88
head "https://github.com/numpy/numpy.git", branch: "main"
99

1010
livecheck do
@@ -38,6 +38,13 @@ def pythons
3838
end
3939

4040
def install
41+
# Fix build failure on macOS Sequoia/Tahoe with Xcode 16+ (missing std::ptrdiff_t)
42+
if MacOS.version >= :sequoia
43+
inreplace "numpy/_core/src/umath/string_fastsearch.h",
44+
/^#include <type_traits>/,
45+
"#include <type_traits>\n#include <cstddef>"
46+
end
47+
4148
pythons.each do |python|
4249
python3 = python.opt_libexec/"bin/python"
4350
system python3, "-m", "pip", "install", "-Csetup-args=-Dblas=openblas",

0 commit comments

Comments
 (0)