Subject: [bug#76006] [PATCH python-team] Add python-num2words

From: Adriano Peluso <[email-masked]>
Date: Sun, 2 Feb 2025 12:06:54 +0100

From db0cb5f2063fa50d8e957701766322c8c9968696 Mon Sep 17 00:00:00 2001
Message-Id: <db0cb5[email-masked]>
In-Reply-To: <9dabb3[email-masked]>
References: <9dabb3[email-masked]>
From: Adriano Peluso <[email-masked]>
Date: Sun, 2 Feb 2025 11:08:27 +0100
Subject: [PATCH 2/2] gnu: Add python-num2words

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

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b4b233d464..6c62661214 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -9247,6 +9247,30 @@ (define-public python-cython-3
            python-wheel))
     (properties '())))
 
+(define-public python-num2words
+  (package
+    (name "python-num2words")
+    (version "0.5.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "num2words" version))
+       (sha256
+        (base32 "1ikryc61qig04xhs69mjd24amyxagmsbb1l0nfiicrkbwlcfqrmh"))))
+    (build-system pyproject-build-system)
+    ;;the tests
+    ;; 1) require python-pip
+    ;; 2) look for /etc/ssl/certs/ca-certificates.crt
+    (arguments (list #:tests? #false))
+    (propagated-inputs (list python-docopt))
+    (native-inputs (list python-setuptools python-wheel))
+    (home-page "https://github.com/savoirfairelinux/num2words")
+    (synopsis "Modules to convert numbers to words. Easily extensible")
+    (description "A library that converts numbers like 42 to words like forty-two.
+It supports multiple languages and can even generate ordinal numbers like forty-second
+(although this last feature is a bit buggy for some languages at the moment).")
+    (license license:gpl2)))
+
 ;; NOTE: when upgrading numpy please make sure that python-numba,
 ;; python-pandas and python-scipy still build, as these three packages are
 ;; often used together.
-- 
2.34.1