python3Packages.levenshtein: fix cython 3.2 compat

This commit is contained in:
Martin Weinelt
2026-02-01 17:40:56 +01:00
parent b4b62bbe24
commit 6c98d6cc3f
2 changed files with 16 additions and 0 deletions
@@ -0,0 +1,13 @@
diff --git a/src/Levenshtein/CMakeLists.txt b/src/Levenshtein/CMakeLists.txt
index 721f7a7..f6159ed 100644
--- a/src/Levenshtein/CMakeLists.txt
+++ b/src/Levenshtein/CMakeLists.txt
@@ -9,7 +9,7 @@ function(create_cython_target _name)
MAIN_DEPENDENCY "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx"
VERBATIM
COMMAND
- Python::Interpreter -m cython "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx"
+ Python::Interpreter -m cython --cplus "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx"
--output-file "${CMAKE_CURRENT_BINARY_DIR}/${_name}.cxx")
set(${_name}
@@ -23,6 +23,9 @@ buildPythonPackage rec {
hash = "sha256-iKWS7gm0t3yPgeX5N09cTa3N1C6GXvIALueO8DlfLfE=";
};
# https://github.com/rapidfuzz/Levenshtein/pull/84
patches = [ ./cython-3.2-compat.patch ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "Cython>=3.1.6,<3.2.0" Cython