1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, pytestCheckHook
6, rapidfuzz
7}:
8
9buildPythonPackage rec {
10 pname = "levenshtein";
11 version = "0.16.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.6";
15
16 src = fetchFromGitHub {
17 owner = "maxbachmann";
18 repo = "Levenshtein";
19 rev = "v${version}";
20 sha256 = "agshUVkkqogj4FbonFd/rrGisMOomS62NND66YKZvjg=";
21 };
22
23 propagatedBuildInputs = [
24 rapidfuzz
25 ];
26
27 checkInputs = [
28 pytestCheckHook
29 ];
30
31 pythonImportsCheck = [
32 "Levenshtein"
33 ];
34
35 meta = with lib; {
36 description = "Functions for fast computation of Levenshtein distance and string similarity";
37 homepage = "https://github.com/maxbachmann/Levenshtein";
38 license = licenses.gpl2Plus;
39 maintainers = with maintainers; [ fab ];
40 };
41}