Package Details: python-num2words 0.5.13-1

Git Clone URL: (read-only, click to copy)
Package Base: python-num2words
Description: Python modules to convert numbers to words.
Upstream URL:
Licenses: LGPL
Submitter: ImNtReal
Maintainer: Rogach
Last Packager: Rogach
Votes: 4
Popularity: 0.000000
First Submitted: 2017-07-31 17:29 (UTC)
Last Updated: 2023-10-19 04:25 (UTC)

Latest Comments

1 2 Next › Last »

Rogach commented on 2022-10-27 05:23 (UTC)

@lodopidolo I've added python-pip to makedepends.

lodopidolo commented on 2022-10-26 17:06 (UTC)

Hi. I had same problem. It was solved installing python-pip package:

$ yay -S python-pip

Perhaps this package may be a dependency but now it isn't.

istobic commented on 2022-02-21 15:10 (UTC) (edited on 2022-02-21 15:11 (UTC) by istobic)

I get the following error:

==> Starting check()...
running test
WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.
/usr/lib/python3.10/site-packages/setuptools/ SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
WARNING: The wheel package is not available.
/usr/bin/python: No module named pip
error: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpl5g84nwk', '--quiet', 'docopt>=0.6.2']' returned non-zero exit status 1.

Rogach commented on 2020-12-30 16:18 (UTC)

I've split python2 version into a separate package, it's still here if somebody needs it:

Rogach commented on 2020-09-16 08:50 (UTC)

@a.kudelin I usually take the approach of "don't break it if it's not broken". It works for now, and I do not have any package download statistics that can be used to justify removal of the feature.

a.kudelin commented on 2020-09-16 08:25 (UTC)

Maybe it's worth to remove python2 dependency? Arch Linux is in the course to get away from it.

Rogach commented on 2020-09-07 17:09 (UTC)

@genofire Are you sure? I don't see any references to wheel in the repository, and we use directly (we do not download the pre-built binary package).

genofire commented on 2020-09-07 15:31 (UTC)

Missing dependency: python-wheel

greyltc commented on 2019-09-26 17:55 (UTC)

Why not just stop building this for python2? 2 is dead anyway

Rogach commented on 2019-09-06 21:20 (UTC)

Test failures happen mostly because cli test runner refers to executable simply as python, regardless of what version it was invoked with. So when running python2 test environment and dependencies are set up for Python 2, but the Python 3 interpreter is invoked instead and the dependency resolution fails.

Also there seems to be an issue with Unicode output when using Python 2.

Below is the patch that fixes both problems and allows the package to build successfully for both python versions.

diff -ruN num2words-0.5.10.orig/bin/num2words num2words-0.5.10/bin/num2words
--- num2words-0.5.10.orig/bin/num2words 2019-09-07 00:06:15.933230111 +0300
+++ num2words-0.5.10/bin/num2words  2019-09-07 00:08:57.515532720 +0300
@@ -82,7 +82,7 @@
         words = num2words.num2words(args['<number>'], lang=args['--lang'], to=args['--to'])
-        sys.stdout.write(words+os.linesep)
+        sys.stdout.write((words.encode("utf-8") if sys.version_info[0] == 2 else words) + os.linesep)
     except Exception as err:
diff -ruN num2words-0.5.10.orig/tests/ num2words-0.5.10/tests/
--- num2words-0.5.10.orig/tests/ 2019-09-07 00:06:15.939896873 +0300
+++ num2words-0.5.10/tests/  2019-09-07 00:06:40.363578331 +0300
@@ -20,6 +20,7 @@

 import os
 import unittest
+import sys

 import delegator

@@ -31,7 +32,7 @@
     def __init__(self):
         self.cmd = os.path.realpath(os.path.join(os.path.dirname(__file__),
                                     "..", "bin", "num2words"))
-        self.cmd_list = ["python", self.cmd]
+        self.cmd_list = [sys.executable, self.cmd]

     def run_cmd(self, *args):
         cmd_list = self.cmd_list + [str(arg) for arg in args]