1{
2 lib,
3 buildPythonPackage,
4 deprecated,
5 fetchFromGitea,
6 importlib-resources,
7 jaconv,
8 py-cpuinfo,
9 pytest-benchmark,
10 pytestCheckHook,
11 pythonOlder,
12 setuptools-scm,
13}:
14
15buildPythonPackage rec {
16 pname = "pykakasi";
17 version = "2.3.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitea {
23 domain = "codeberg.org";
24 owner = "miurahr";
25 repo = "pykakasi";
26 rev = "refs/tags/v${version}";
27 hash = "sha256-b2lYYdg1RW1xRD3hym7o1EnxzN/U5txVTWRifwZn3k0=";
28 };
29
30 build-system = [ setuptools-scm ];
31
32 dependencies = [
33 jaconv
34 deprecated
35 ] ++ lib.optionals (pythonOlder "3.9") [ importlib-resources ];
36
37 nativeCheckInputs = [
38 py-cpuinfo
39 pytest-benchmark
40 pytestCheckHook
41 ];
42
43 disabledTests = [
44 # We don't care about benchmarks
45 "test_benchmark"
46 "pytest_benchmark_update_machine_info"
47 "pytest_benchmark_update_json"
48 # Assertion error
49 "test_aozora"
50 ];
51
52 pythonImportsCheck = [ "pykakasi" ];
53
54 meta = with lib; {
55 description = "Python converter for Japanese Kana-kanji sentences into Kana-Roman";
56 homepage = "https://codeberg.org/miurahr/pykakasi";
57 changelog = "https://codeberg.org/miurahr/pykakasi/src/tag/v${version}/CHANGELOG.rst";
58 license = licenses.gpl3Plus;
59 maintainers = with maintainers; [ fab ];
60 mainProgram = "kakasi";
61 };
62}