depot/third_party/nixpkgs/pkgs/development/python-modules/pypinyin/default.nix
Default email 159e378cbb Project import generated by Copybara.
GitOrigin-RevId: c04d5652cfa9742b1d519688f65d1bbccea9eb7e
2024-09-19 17:19:46 +03:00

40 lines
932 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pypinyin";
version = "0.53.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mozillazg";
repo = "python-pinyin";
rev = "refs/tags/v${version}";
hash = "sha256-NGW94Labk3vAv4bfq/+ba2lnL/uebg0ODZWEi2yNIjg=";
};
postPatch = ''
substituteInPlace pytest.ini --replace \
"--cov-report term-missing" ""
'';
nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "tests" ];
meta = with lib; {
description = "Chinese Characters to Pinyin - ";
mainProgram = "pypinyin";
homepage = "https://github.com/mozillazg/python-pinyin";
changelog = "https://github.com/mozillazg/python-pinyin/blob/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = teams.tts.members;
};
}