1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 pythonOlder,
7
8 pytestCheckHook,
9
10 setuptools,
11
12 # for testing
13 numpy,
14 importlib-resources,
15
16 # requirements
17 editdistpy,
18}:
19
20buildPythonPackage rec {
21 pname = "symspellpy";
22 version = "6.9.0";
23 pyproject = true;
24
25 disabled = pythonOlder "3.9";
26
27 src = fetchFromGitHub {
28 owner = "mammothb";
29 repo = "symspellpy";
30 tag = "v${version}";
31 hash = "sha256-isxANYSiwN8pQ7/XfMtO7cyoGdTyrXYOZ6C5rDJsJIs=";
32 };
33
34 build-system = [ setuptools ];
35
36 dependencies = [ editdistpy ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 numpy
41 importlib-resources
42 ];
43
44 pythonImportsCheck = [
45 "symspellpy"
46 "symspellpy.symspellpy"
47 ];
48
49 meta = {
50 description = "Python port of SymSpell v6.7.1, which provides much higher speed and lower memory consumption";
51 homepage = "https://github.com/mammothb/symspellpy";
52 changelog = "https://github.com/mammothb/symspellpy/releases/tag/${src.tag}";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ vizid ];
55 };
56}