1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pytest-cov-stub,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "pypinyin";
12 version = "0.55.0";
13 format = "setuptools";
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "mozillazg";
19 repo = "python-pinyin";
20 tag = "v${version}";
21 hash = "sha256-Xd5dxEiaByjtZmlORyK4cBPfNyIcZwbF40SvEKZ24Ks=";
22 };
23
24 nativeCheckInputs = [
25 pytestCheckHook
26 pytest-cov-stub
27 ];
28
29 enabledTestPaths = [ "tests" ];
30
31 meta = with lib; {
32 description = "Chinese Characters to Pinyin - 汉字转拼音";
33 mainProgram = "pypinyin";
34 homepage = "https://github.com/mozillazg/python-pinyin";
35 changelog = "https://github.com/mozillazg/python-pinyin/blob/${src.tag}/CHANGELOG.rst";
36 license = licenses.mit;
37 teams = [ teams.tts ];
38 };
39}