Subject: [bug#76746] [PATCH v2 07/13] gnu: Add python-pykakasi.

From: 45mg <[email-masked]>
Date: Tue, 11 Mar 2025 19:53:26 +0530

* gnu/packages/python-xyz.scm (python-pykakasi): New variable.

Change-Id: I127cc34f58d4f8df737f878499c448d969c9a831
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4b35f11eec..de9b5c1a49 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -34521,6 +34521,42 @@ (define-public python-jaconv
 Katakana, Hankaku (half-width character) and Zenkaku (full-width character)")
     (license license:expat)))
 
+(define-public python-pykakasi
+  (package
+    (name "python-pykakasi")
+    (version "2.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pykakasi" version))
+       (sha256
+        (base32 "18dhcw7myw5idajnfynjbvqxmyf9m0cygfwsavbbi7zmcf72l1gs"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags '(list "-k"
+                          (string-append
+                           ;; Disable benchmarks.
+                           "not test_benchmark"
+                           " and not pytest_benchmark_update_machine_info"
+                           " and not pytest_benchmark_update_json"
+                           ;; Fails with AssertionError
+                           " and not test_aozora"))))
+    (propagated-inputs (list python-jaconv python-deprecated))
+    (native-inputs (list python-py-cpuinfo
+                         python-pytest
+                         python-pytest-benchmark
+                         python-setuptools
+                         python-setuptools-scm
+                         python-wheel))
+    (home-page "https://codeberg.org/miurahr/pykakasi")
+    (synopsis "Convert Japanese Kana-kanji sentences into Kana-Roman")
+    (description
+     "This is a Python Natural Language Processing (NLP) library to
+transliterate hiragana, katakana and kanji (Japanese text) into
+rōmaji (Latin/Roman alphabet). It can handle characters in NFC form.")
+    (license license:gpl2)))
+
 (define-public python-flufl-lock
   (package
     (name "python-flufl-lock")
-- 
2.48.1