2021-04-15 02:58:51 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypinyin";
|
2021-06-15 12:13:10 +01:00
|
|
|
version = "0.42.0";
|
2021-04-15 02:58:51 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozillazg";
|
|
|
|
repo = "python-pinyin";
|
|
|
|
rev = "v${version}";
|
2021-06-15 12:13:10 +01:00
|
|
|
sha256 = "0i0ggizkgd809ylz74j1v5lfpyifz3wypj6f8l8fr5ad7a7r9s09";
|
2021-04-15 02:58:51 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini --replace \
|
|
|
|
"--cov-report term-missing" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Chinese Characters to Pinyin - 汉字转拼音";
|
|
|
|
homepage = "https://github.com/mozillazg/python-pinyin";
|
|
|
|
changelog = "https://github.com/mozillazg/python-pinyin/blob/master/CHANGELOG.rst";
|
|
|
|
license = licenses.mit;
|
2021-06-04 13:38:01 +01:00
|
|
|
maintainers = teams.tts.members;
|
2021-04-15 02:58:51 +01:00
|
|
|
};
|
|
|
|
}
|