1{ lib
2, buildPythonPackage
3, pythonOlder
4, pythonAtLeast
5, fetchFromGitHub
6 # build inputs
7, inflect
8, num2words
9, numpy
10, scipy
11, scikit-learn
12, joblib
13, wikipedia
14, stemming
15, setuptools
16}:
17let
18 pname = "quantulum3";
19 version = "0.9.0";
20in
21buildPythonPackage {
22 inherit version pname;
23 format = "pyproject";
24
25 # Pypi source package doesn't contain tests
26 src = fetchFromGitHub {
27 owner = "nielstron";
28 repo = pname;
29 rev = "9dafd76d3586aa5ea1b96164d86c73037e827294";
30 hash = "sha256-fHztPeTbMp1aYsj+STYWzHgwdY0Q9078qXpXxtA8pPs=";
31 };
32
33 disabled = pythonOlder "3.7";
34
35 propagatedBuildInputs = [
36 inflect
37 num2words
38 numpy
39 scipy
40 scikit-learn
41 joblib
42 wikipedia
43 stemming
44 setuptools
45 ];
46
47 pythonImportsCheck = [ "quantulum3" ];
48
49 meta = with lib; {
50 description = "Library for unit extraction - fork of quantulum for python3";
51 homepage = "https://github.com/nielstron/quantulum3";
52 license = licenses.mit;
53 maintainers = with maintainers; [ happysalada ];
54 };
55}