1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 isPy27,
6 setuptools,
7 regex,
8 csvw,
9 clldutils,
10 pytestCheckHook,
11 pytest-cov-stub,
12 pytest-mock,
13}:
14
15buildPythonPackage rec {
16 pname = "segments";
17 version = "2.3.0";
18 pyproject = true;
19 disabled = isPy27;
20
21 src = fetchFromGitHub {
22 owner = "cldf";
23 repo = "segments";
24 rev = "v${version}";
25 sha256 = "sha256-5VgjaWeinXimpoCBhKBvVOmvcCIWrOqYMQegVDGJAKo=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 regex
32 csvw
33 clldutils
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 pytest-cov-stub
39 pytest-mock
40 ];
41
42 meta = with lib; {
43 changelog = "https://github.com/cldf/segments/blob/${src.rev}/CHANGES.md";
44 description = "Unicode Standard tokenization routines and orthography profile segmentation";
45 mainProgram = "segments";
46 homepage = "https://github.com/cldf/segments";
47 license = licenses.asl20;
48 maintainers = [ ];
49 };
50}