diff --git a/libboost-1.86.0-python-numpy-2.1.1.patch b/libboost-1.86.0-python-numpy-2.1.1.patch new file mode 100644 index 0000000..f4f029a --- /dev/null +++ b/libboost-1.86.0-python-numpy-2.1.1.patch @@ -0,0 +1,28 @@ +From 33ac06ca59a68266d3d26edf08205d31ddab4a6c Mon Sep 17 00:00:00 2001 +From: Alexis DUBURCQ +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/src/numpy/dtype.cpp ++++ b/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(obj)); + } + +-int dtype::get_itemsize() const { return reinterpret_cast(ptr())->elsize;} ++int dtype::get_itemsize() const { ++#if NPY_ABI_VERSION < 0x02000000 ++ return reinterpret_cast(ptr())->elsize; ++#else ++ return PyDataType_ELSIZE(reinterpret_cast(ptr())); ++#endif ++} + + bool equivalent(dtype const & a, dtype const & b) { + // On Windows x64, the behaviour described on diff --git a/libboost.spec b/libboost.spec index 18d8ce4..f0f7d82 100644 --- a/libboost.spec +++ b/libboost.spec @@ -1,8 +1,8 @@ %define pckver %(echo %version | tr . _) %define pckmajver %(echo %version | cut -d. -f1-2 | tr . _) Name: libboost -Version: 1.85.0 -Release: 4mamba +Version: 1.86.0 +Release: 1mamba Summary: Free peer-reviewed portable C++ source libraries Group: System/Libraries Vendor: openmamba @@ -10,6 +10,7 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://www.boost.org/ Source: https://boostorg.jfrog.io/artifactory/main/release/%{version}/source/boost_%{pckver}.tar.bz2 +Patch0: libboost-1.86.0-python-numpy-2.1.1.patch License: Boost Software License ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -77,6 +78,7 @@ This package contains then Boost.python library for Python 3. %setup -q -n boost_%{pckver} #-D -T #:<< _EOF +%patch 0 -p1 -d libs/python -b .python-numpy-2.1.1 %build #:<< _EOF @@ -142,8 +144,6 @@ done %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%post -p /sbin/ldconfig -%postun -p /sbin/ldconfig %files %defattr(-,root,root) @@ -172,6 +172,9 @@ done %{_libdir}/libboost_numpy311.so.* %changelog +* Sun Sep 08 2024 Automatic Build System 1.86.0-1mamba +- automatic version update by autodist + * Mon May 06 2024 Silvan Calarco 1.85.0-4mamba - remove and provide/obsolete boost-jam requirement