2021-04-17 00:35:05 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pypinyin";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.46.0";
|
2021-04-17 00:35:05 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mozillazg";
|
|
|
|
repo = "python-pinyin";
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
sha256 = "sha256-KPyFvO6TR0mg09xcraHFaWklJgzF5oqk3d8H+G4gh3I=";
|
2021-04-17 00:35:05 +00: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-28 23:13:55 +00:00
|
|
|
maintainers = teams.tts.members;
|
2021-04-17 00:35:05 +00:00
|
|
|
};
|
|
|
|
}
|