1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools-scm,
6 future,
7 python,
8}:
9
10buildPythonPackage rec {
11 pname = "word2number";
12 version = "1.1";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "akshaynagpal";
17 repo = "w2n";
18 tag = version;
19 hash = "sha256-dgHPEfieNDZnP6+YvywvN3ZzmeICav0WMYKkWDSJ/LE=";
20 };
21
22 build-system = [
23 setuptools-scm
24 ];
25
26 dependencies = [
27 future
28 ];
29
30 pythonImportsCheck = [
31 "word2number"
32 ];
33
34 checkPhase = ''
35 ${lib.getExe python} unit_testing.py
36 '';
37
38 meta = {
39 changelog = "https://github.com/akshaynagpal/w2n/releases/tag/${version}";
40 description = "Convert number words (eg. twenty one) to numeric digits (21)";
41 homepage = "http://w2n.readthedocs.io/";
42 license = [ lib.licenses.mit ];
43 maintainers = [ lib.maintainers.booxter ];
44 };
45}