depot/third_party/nixpkgs/pkgs/development/python-modules/pypinyin/default.nix
Default email 94427deb9d Project import generated by Copybara.
GitOrigin-RevId: f91ee3065de91a3531329a674a45ddcb3467a650
2023-05-24 16:37:59 +03:00

42 lines
907 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "pypinyin";
version = "0.49.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "mozillazg";
repo = "python-pinyin";
rev = "refs/tags/v${version}";
hash = "sha256-4XiPkx7tYD5PQVyeJ/nvxrRzWmeLp9JfY1B853IEE7U=";
};
postPatch = ''
substituteInPlace pytest.ini --replace \
"--cov-report term-missing" ""
'';
nativeCheckInputs = [
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/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = teams.tts.members;
};
}