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