2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, isPy27
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2020-09-25 04:45:31 +00:00
|
|
|
, regex
|
|
|
|
, csvw
|
|
|
|
, clldutils
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "segments";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.2.1";
|
|
|
|
pyproject = true;
|
2020-09-25 04:45:31 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cldf";
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "segments";
|
2020-09-25 04:45:31 +00:00
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
sha256 = "sha256-Z9AQnsK/0HUCZDzdpQKNfSBWxfAOjWNBytcfI6yBY84=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
2024-02-29 20:09:43 +00:00
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace-fail "--cov" ""
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
regex
|
|
|
|
csvw
|
|
|
|
clldutils
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/cldf/segments/blob/${src.rev}/CHANGES.md";
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "Unicode Standard tokenization routines and orthography profile segmentation";
|
|
|
|
homepage = "https://github.com/cldf/segments";
|
|
|
|
license = licenses.asl20;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|