1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, cmake 6, cython_3 7, ninja 8, scikit-build 9, setuptools 10, jarowinkler 11, numpy 12, hypothesis 13, jarowinkler-cpp 14, pandas 15, pytestCheckHook 16, rapidfuzz-cpp 17, taskflow 18}: 19 20buildPythonPackage rec { 21 pname = "rapidfuzz"; 22 version = "2.13.2"; 23 24 disabled = pythonOlder "3.7"; 25 26 format = "pyproject"; 27 28 src = fetchFromGitHub { 29 owner = "maxbachmann"; 30 repo = "RapidFuzz"; 31 rev = "refs/tags/v${version}"; 32 hash = "sha256-a83Vww9dEh0nNylnZwCm6PJYmfKvw5RnMLerfKfN1dY="; 33 }; 34 35 nativeBuildInputs = [ 36 cmake 37 cython_3 38 ninja 39 scikit-build 40 setuptools 41 ]; 42 43 dontUseCmakeConfigure = true; 44 45 buildInputs = [ 46 jarowinkler-cpp 47 rapidfuzz-cpp 48 taskflow 49 ]; 50 51 preBuild = '' 52 export RAPIDFUZZ_BUILD_EXTENSION=1 53 ''; 54 55 propagatedBuildInputs = [ 56 jarowinkler 57 numpy 58 ]; 59 60 checkInputs = [ 61 hypothesis 62 pandas 63 pytestCheckHook 64 ]; 65 66 pythonImportsCheck = [ 67 "rapidfuzz.fuzz" 68 "rapidfuzz.string_metric" 69 "rapidfuzz.process" 70 "rapidfuzz.utils" 71 ]; 72 73 meta = with lib; { 74 description = "Rapid fuzzy string matching"; 75 homepage = "https://github.com/maxbachmann/RapidFuzz"; 76 changelog = "https://github.com/maxbachmann/RapidFuzz/blob/${src.rev}/CHANGELOG.md"; 77 license = licenses.mit; 78 maintainers = with maintainers; [ dotlambda ]; 79 }; 80}