diff options
author | David Elsing <david.elsing@posteo.net> | 2025-01-22 18:32:18 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-01-27 14:42:40 +0100 |
commit | c8ceb0cb8351adcb87c23b5c87b5e8725a94dc4e (patch) | |
tree | 4b5b229611ddcac22046aab121bed8906243652b /gnu/packages/patches/python-optree-fix-32-bit.patch | |
parent | 2f10079c2347153920da6d992b65aaaf8f37bf98 (diff) | |
download | guix-c8ceb0cb8351adcb87c23b5c87b5e8725a94dc4e.tar.gz guix-c8ceb0cb8351adcb87c23b5c87b5e8725a94dc4e.zip |
gnu: python-optree: Update to 0.14.0.
* gnu/packages/python-xyz.scm (python-optree): Update to 0.14.0.
[source]: Remove patch.
[arguments]<#:test-flags>: Disable additional failing test.
[native-inputs]: Replace pybind11 with pybind11-2.13 and cmake with
cmake-minimal.
* gnu/packages/patches/python-optree-fix-32-bit.patch: Remove file.
* gnu/local.mk (dist_patch_DATA): Remove it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/patches/python-optree-fix-32-bit.patch')
-rw-r--r-- | gnu/packages/patches/python-optree-fix-32-bit.patch | 122 |
1 files changed, 0 insertions, 122 deletions
diff --git a/gnu/packages/patches/python-optree-fix-32-bit.patch b/gnu/packages/patches/python-optree-fix-32-bit.patch deleted file mode 100644 index 6a32c39bd8..0000000000 --- a/gnu/packages/patches/python-optree-fix-32-bit.patch +++ /dev/null @@ -1,122 +0,0 @@ -In include/utils.h, ssize_t is an alias for py::ssize_t, which is an alias for -Py_ssize_t in Python, which is an alias for the system ssize_t. -The latter is defined in glibc as int if __WORDSIZE == 32 and as long int if -__WORDSIZE == 64. Therefore, we need to remove the explicit template -specialization for int in the first case. - -diff --git a/include/utils.h b/include/utils.h -index 950a02b..82a9591 100644 ---- a/include/utils.h -+++ b/include/utils.h -@@ -141,10 +141,12 @@ template <> - inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const size_t& item) { - return PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)); - } -+#if __WORDSIZE != 32 - template <> - inline py::handle GET_ITEM_HANDLE<py::tuple>(const py::handle& container, const int& item) { - return PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item)); - } -+#endif - template <> - inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const ssize_t& item) { - return PyList_GET_ITEM(container.ptr(), item); -@@ -153,10 +155,12 @@ template <> - inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const size_t& item) { - return PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)); - } -+#if __WORDSIZE != 32 - template <> - inline py::handle GET_ITEM_HANDLE<py::list>(const py::handle& container, const int& item) { - return PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item)); - } -+#endif - - template <typename Container, typename Item> - inline py::object GET_ITEM_BORROW(const py::handle& container, const Item& item) { -@@ -171,11 +175,13 @@ inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const - return py::reinterpret_borrow<py::object>( - PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#if __WORDSIZE != 32 - template <> - inline py::object GET_ITEM_BORROW<py::tuple>(const py::handle& container, const int& item) { - return py::reinterpret_borrow<py::object>( - PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#endif - template <> - inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const ssize_t& item) { - return py::reinterpret_borrow<py::object>(PyList_GET_ITEM(container.ptr(), item)); -@@ -185,11 +191,13 @@ inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const s - return py::reinterpret_borrow<py::object>( - PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#if __WORDSIZE != 32 - template <> - inline py::object GET_ITEM_BORROW<py::list>(const py::handle& container, const int& item) { - return py::reinterpret_borrow<py::object>( - PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#endif - - template <typename Container, typename Item> - inline py::object GET_ITEM_STEAL(const py::handle& container, const Item& item) { -@@ -204,11 +212,13 @@ inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const s - return py::reinterpret_steal<py::object>( - PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#if __WORDSIZE != 32 - template <> - inline py::object GET_ITEM_STEAL<py::tuple>(const py::handle& container, const int& item) { - return py::reinterpret_steal<py::object>( - PyTuple_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#endif - template <> - inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const ssize_t& item) { - return py::reinterpret_steal<py::object>(PyList_GET_ITEM(container.ptr(), item)); -@@ -218,11 +228,13 @@ inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const si - return py::reinterpret_steal<py::object>( - PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#if __WORDSIZE != 32 - template <> - inline py::object GET_ITEM_STEAL<py::list>(const py::handle& container, const int& item) { - return py::reinterpret_steal<py::object>( - PyList_GET_ITEM(container.ptr(), py::ssize_t_cast(item))); - } -+#endif - - template <typename Container, typename Item> - inline void SET_ITEM(const py::handle& container, const Item& item, const py::handle& value) { -@@ -240,12 +252,14 @@ inline void SET_ITEM<py::tuple>(const py::handle& container, - const py::handle& value) { - PyTuple_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr()); - } -+#if __WORDSIZE != 32 - template <> - inline void SET_ITEM<py::tuple>(const py::handle& container, - const int& item, - const py::handle& value) { - PyTuple_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr()); - } -+#endif - template <> - inline void SET_ITEM<py::list>(const py::handle& container, - const ssize_t& item, -@@ -258,12 +272,14 @@ inline void SET_ITEM<py::list>(const py::handle& container, - const py::handle& value) { - PyList_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr()); - } -+#if __WORDSIZE != 32 - template <> - inline void SET_ITEM<py::list>(const py::handle& container, - const int& item, - const py::handle& value) { - PyList_SET_ITEM(container.ptr(), py::ssize_t_cast(item), value.inc_ref().ptr()); - } -+#endif - - template <typename PyType> - inline void AssertExact(const py::handle& object) { |