Sync from SUSE:SLFO:Main boost revision 5b6bdda0ca81723c93e197bd7d26736d
This commit is contained in:
parent
74577a98d6
commit
c455a4d7de
28
boost-python-support-numpy2.patch
Normal file
28
boost-python-support-numpy2.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 0474de0f6cc9c6e7230aeb7164af2f7e4ccf74bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexis DUBURCQ <alexis.duburcq@gmail.com>
|
||||||
|
Date: Fri, 15 Mar 2024 14:10:16 +0100
|
||||||
|
Subject: [PATCH] Support numpy 2.0.0b1
|
||||||
|
|
||||||
|
---
|
||||||
|
src/numpy/dtype.cpp | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/numpy/dtype.cpp b/src/numpy/dtype.cpp
|
||||||
|
index 88a20a27b5..da30d1927b 100644
|
||||||
|
--- a/libs/python/src/numpy/dtype.cpp
|
||||||
|
+++ b/libs/python/src/numpy/dtype.cpp
|
||||||
|
@@ -98,7 +98,13 @@ python::detail::new_reference dtype::convert(object const & arg, bool align)
|
||||||
|
return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
-int dtype::get_itemsize() const { return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;}
|
||||||
|
+int dtype::get_itemsize() const {
|
||||||
|
+#if NPY_ABI_VERSION < 0x02000000
|
||||||
|
+ return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;
|
||||||
|
+#else
|
||||||
|
+ return PyDataType_ELSIZE(reinterpret_cast<PyArray_Descr*>(ptr()));
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
|
||||||
|
bool equivalent(dtype const & a, dtype const & b) {
|
||||||
|
// On Windows x64, the behaviour described on
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 28 10:41:16 UTC 2024 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>
|
||||||
|
|
||||||
|
- Add boost-python-support-numpy2.patch: fixes building with
|
||||||
|
numpy >= 2.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 14 08:43:05 CET 2023 - aschnell@suse.com
|
Thu Dec 14 08:43:05 CET 2023 - aschnell@suse.com
|
||||||
|
|
||||||
@ -2549,3 +2555,4 @@ Wed Jul 23 14:52:15 CEST 2003 - pthomas@suse.de
|
|||||||
|
|
||||||
- Initial package, based on the work by Robert Schiele.
|
- Initial package, based on the work by Robert Schiele.
|
||||||
- Fix building with Python 2.3
|
- Fix building with Python 2.3
|
||||||
|
|
||||||
|
@ -243,6 +243,7 @@ Patch18: dynamic_linking.patch
|
|||||||
Patch20: python_library_name.patch
|
Patch20: python_library_name.patch
|
||||||
Patch21: boost-remove-cmakedir.patch
|
Patch21: boost-remove-cmakedir.patch
|
||||||
Patch22: boost-process.patch
|
Patch22: boost-process.patch
|
||||||
|
Patch23: boost-python-support-numpy2.patch
|
||||||
%{?suse_build_hwcaps_libs}
|
%{?suse_build_hwcaps_libs}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gmp-devel
|
BuildRequires: gmp-devel
|
||||||
@ -1254,6 +1255,7 @@ find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {}
|
|||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
%patch21 -p1
|
%patch21 -p1
|
||||||
%patch22 -p2
|
%patch22 -p2
|
||||||
|
%patch23 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
find . -type f -exec chmod u+w {} +
|
find . -type f -exec chmod u+w {} +
|
||||||
|
Loading…
Reference in New Issue
Block a user