stripe-cli: 1.23.3 -> 1.23.5 (#375724)
[NixPkgs.git] / pkgs / development / python-modules / attacut / default.nix
blob51f92e0abeec8dc963863d27037097d3d308b223
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   fetchpatch,
7   setuptools,
9   pytestCheckHook,
11   docopt,
12   fire,
13   numpy,
14   python-crfsuite,
15   pyyaml,
16   six,
17   ssg,
18   torch,
21 buildPythonPackage rec {
22   pname = "attacut";
23   version = "1.1.0-dev";
24   pyproject = true;
26   src = fetchFromGitHub {
27     owner = "PyThaiNLP";
28     repo = "attacut";
29     tag = "v${version}";
30     hash = "sha256-x3JJC1Xd+tsOAHJEHGzIrhIrNGSvLSanAFc7+uXb2Kk=";
31   };
33   # no more need, see patch...
34   postPatch = ''
35     sed -i "/nptyping>=/d" setup.py
36   '';
38   patches = [
39     (fetchpatch {
40       name = "fix-nptyping-deprecated-array.patch";
41       url = "https://github.com/PyThaiNLP/attacut/commit/a707297b3f08a015d32d8ac241aa8cb11128cbd4.patch";
42       includes = [ "attacut/evaluation.py" ];
43       hash = "sha256-k2DJPwiH1Fyf5u6+zavx0bankCXsJVZrw1MGcf8ZL+M=";
44     })
45   ];
47   build-system = [ setuptools ];
49   dependencies = [
50     docopt
51     fire
52     numpy
53     python-crfsuite
54     pyyaml
55     six
56     ssg
57     torch
58   ];
60   nativeCheckInputs = [ pytestCheckHook ];
62   pytestFlagsArray = [ "tests/*" ];
64   pythonImportsCheck = [ "attacut" ];
66   meta = with lib; {
67     description = "Fast and Accurate Neural Thai Word Segmenter";
68     homepage = "https://github.com/PyThaiNLP/attacut";
69     license = licenses.mit;
70     maintainers = with maintainers; [ vizid ];
71     mainProgram = "attacut-cli";
72   };