at master 1.2 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 pytestCheckHook, 7 8 pythonOlder, 9 10 setuptools, 11 cython, 12 13 symspellpy, 14 numpy, 15 editdistpy, 16}: 17 18buildPythonPackage rec { 19 pname = "editdistpy"; 20 version = "0.1.6"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.9"; 24 25 src = fetchFromGitHub { 26 owner = "mammothb"; 27 repo = "editdistpy"; 28 tag = "v${version}"; 29 hash = "sha256-bUdwhMFDIhHuIlcqIZt6mSh8xwW/2igw0QiWGvQBLC8="; 30 }; 31 32 build-system = [ 33 setuptools 34 cython 35 ]; 36 37 # error: infinite recursion encountered 38 doCheck = false; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 symspellpy 43 numpy 44 ]; 45 46 preCheck = '' 47 rm -r editdistpy 48 ''; 49 50 passthru.tests = { 51 check = editdistpy.overridePythonAttrs (_: { 52 doCheck = true; 53 }); 54 }; 55 56 pythonImportsCheck = [ "editdistpy" ]; 57 58 meta = { 59 description = "Fast Levenshtein and Damerau optimal string alignment algorithms"; 60 homepage = "https://github.com/mammothb/editdistpy"; 61 changelog = "https://github.com/mammothb/editdistpy/releases/tag/${src.tag}"; 62 license = lib.licenses.mit; 63 maintainers = with lib.maintainers; [ vizid ]; 64 }; 65}