2021-04-17 00:35:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2021-04-17 00:35:05 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypinyin";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.49.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozillazg";
|
|
|
|
repo = "python-pinyin";
|
2022-09-09 14:08:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-4XiPkx7tYD5PQVyeJ/nvxrRzWmeLp9JfY1B853IEE7U=";
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini --replace \
|
|
|
|
"--cov-report term-missing" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-17 00:35:05 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Chinese Characters to Pinyin - 汉字转拼音";
|
|
|
|
homepage = "https://github.com/mozillazg/python-pinyin";
|
2023-05-24 13:37:59 +00:00
|
|
|
changelog = "https://github.com/mozillazg/python-pinyin/blob/v${version}/CHANGELOG.rst";
|
2021-04-17 00:35:05 +00:00
|
|
|
license = licenses.mit;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = teams.tts.members;
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
}
|