Add patch for PyArrow to build against NumPy v2

This commit is contained in:
Agriya Khetarpal 2024-12-19 02:13:19 +05:30
parent 73edeaebc2
commit b651698ab3
No known key found for this signature in database
2 changed files with 27 additions and 0 deletions

View File

@ -8,6 +8,7 @@ source:
sha256: 2dc8da5f8796afe213ecc5e5aba85bb82d91520eff3cf315784a52d0fa61d7fc
patches:
- patches/autoload_timezones.patch
- patches/0001-Fix-include-directory-for-NumPy-v2.patch
build:
script: |
# move things around so that the top level folder is the python folder

View File

@ -0,0 +1,26 @@
From 48b75dbacee6bae365f91e55af302e3234b3bebd Mon Sep 17 00:00:00 2001
From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com>
Date: Thu, 19 Dec 2024 02:11:43 +0530
Subject: [PATCH] Fix include directory for NumPy v2
NumPy 2.0 changed the location of the header files
---
python/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index c39a1129ac..6171d1b0f3 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -166,7 +166,7 @@ if($ENV{PYODIDE})
# modules (at least under Pyodide it does).
set(Python3_INCLUDE_DIR $ENV{PYTHONINCLUDE})
set(Python3_LIBRARY $ENV{CPYTHONLIB})
- set(Python3_NumPy_INCLUDE_DIR $ENV{NUMPY_LIB}/core/include)
+ set(Python3_NumPy_INCLUDE_DIR $ENV{NUMPY_LIB}/_core/include)
set(Python3_EXECUTABLE)
set(ENV{_PYTHON_SYSCONFIGDATA_NAME} $ENV{SYSCONFIG_NAME})
# we set the c and cxx compiler manually to bypass pywasmcross
--
2.39.5 (Apple Git-154)