Benjamin Greiner
5009c94269
* Better support for CPUs that do not have a power of 2 number of cores. See #479 and #490. Thanks to @avalentino. * Allow numexpr to run with the multithreading package in Python. See PR #496. Thanks to @emmaai * Wheels for Python 3.13 are now provided. - Drop fix-test-max-threads-unset.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numexpr?expand=0&rev=43
29 lines
987 B
Diff
29 lines
987 B
Diff
From b35f5fcbd8447cb36268d0d344c8ef65b1912187 Mon Sep 17 00:00:00 2001
|
|
From: Sebastian Berg <sebastianb@nvidia.com>
|
|
Date: Wed, 8 May 2024 15:31:04 +0200
|
|
Subject: [PATCH] MAINT: Allow building with NumPy 1.x locally
|
|
|
|
I have build locally without build isolation and it seems to work
|
|
fine.
|
|
---
|
|
numexpr/interpreter.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
Index: numexpr-2.10.0/numexpr/interpreter.cpp
|
|
===================================================================
|
|
--- numexpr-2.10.0.orig/numexpr/interpreter.cpp
|
|
+++ numexpr-2.10.0/numexpr/interpreter.cpp
|
|
@@ -47,6 +47,12 @@
|
|
#define AVAILABLE(Haystack, Haystack_Len, J, Needle_Len) \
|
|
((Haystack_Len) >= (J) + (Needle_Len))
|
|
|
|
+// To allow building with NumPy<2 locally define the new NumPy macros:
|
|
+#if NPY_ABI_VERSION < 0x02000000
|
|
+ #define PyDataType_ELSIZE(descr) ((descr)->elsize)
|
|
+ #define PyDataType_SET_ELSIZE(descr, size) (descr)->elsize = size
|
|
+#endif
|
|
+
|
|
#include "str-two-way.hpp"
|
|
|
|
#ifdef DEBUG
|