14
0

Accepting request 1199876 from home:mcalabkova:branches:devel:languages:python

- Add upstream patch numpy2.patch to fix compatibility with Numpy 2
  * f897b0ed75

OBS-URL: https://build.opensuse.org/request/show/1199876
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opengl-accelerate?expand=0&rev=27
This commit is contained in:
2024-09-11 07:53:49 +00:00
committed by Git OBS Bridge
parent a9ff18be43
commit 57db7355d0
3 changed files with 30 additions and 0 deletions

22
numpy2.patch Normal file
View File

@@ -0,0 +1,22 @@
From f897b0ed75c00d4c524be4689683a334832217ac Mon Sep 17 00:00:00 2001
From: "Mike C. Fletcher" <mcfletch@vrplumber.com>
Date: Mon, 1 Jul 2024 11:33:37 -0400
Subject: [PATCH] BUGFIX Numpy intp type for latest numpy
---
accelerate/src/numpy_formathandler.pyx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/accelerate/src/numpy_formathandler.pyx b/accelerate/src/numpy_formathandler.pyx
index 47ed919b..ae5c7bfa 100644
--- a/accelerate/src/numpy_formathandler.pyx
+++ b/accelerate/src/numpy_formathandler.pyx
@@ -20,7 +20,7 @@ cdef extern from "numpy/arrayobject.h":
int NPY_ARRAY_FORCECAST
int PyArray_ISCARRAY( np.ndarray instance )
int PyArray_ISCARRAY_RO( np.ndarray instance )
- cdef np.ndarray PyArray_Zeros(int nd, np.Py_intptr_t* dims, np.dtype, int fortran)
+ cdef np.ndarray PyArray_Zeros(int nd, np.npy_intp* dims, np.dtype, int fortran)
cdef np.ndarray PyArray_EnsureArray(object)
cdef int PyArray_FillWithScalar(np.ndarray, object)
cdef void* PyArray_DATA( np.ndarray )