Merge pull request #307542 from ViZiD/attacut

python312Packages.attacut: init at 1.1.0-dev

authored by OTABI Tomoya and committed by GitHub 6cc09019 03b825b6

+75
+73
pkgs/development/python-modules/attacut/default.nix
···
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + fetchpatch, 6 + 7 + setuptools, 8 + 9 + pytestCheckHook, 10 + 11 + docopt, 12 + fire, 13 + numpy, 14 + python-crfsuite, 15 + pyyaml, 16 + six, 17 + ssg, 18 + torch, 19 + }: 20 + 21 + buildPythonPackage rec { 22 + pname = "attacut"; 23 + version = "1.1.0-dev"; 24 + pyproject = true; 25 + 26 + src = fetchFromGitHub { 27 + owner = "PyThaiNLP"; 28 + repo = "attacut"; 29 + rev = "refs/tags/v${version}"; 30 + hash = "sha256-x3JJC1Xd+tsOAHJEHGzIrhIrNGSvLSanAFc7+uXb2Kk="; 31 + }; 32 + 33 + # no more need, see patch... 34 + postPatch = '' 35 + sed -i "/nptyping>=/d" setup.py 36 + ''; 37 + 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 + ]; 46 + 47 + build-system = [ setuptools ]; 48 + 49 + dependencies = [ 50 + docopt 51 + fire 52 + numpy 53 + python-crfsuite 54 + pyyaml 55 + six 56 + ssg 57 + torch 58 + ]; 59 + 60 + nativeCheckInputs = [ pytestCheckHook ]; 61 + 62 + pytestFlagsArray = [ "tests/*" ]; 63 + 64 + pythonImportsCheck = [ "attacut" ]; 65 + 66 + meta = with lib; { 67 + description = "A 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 + }; 73 + }
+2
pkgs/top-level/python-packages.nix
··· 931 932 atsim-potentials = callPackage ../development/python-modules/atsim-potentials { }; 933 934 attrdict = callPackage ../development/python-modules/attrdict { }; 935 936 attrs = callPackage ../development/python-modules/attrs { };
··· 931 932 atsim-potentials = callPackage ../development/python-modules/atsim-potentials { }; 933 934 + attacut = callPackage ../development/python-modules/attacut { }; 935 + 936 attrdict = callPackage ../development/python-modules/attrdict { }; 937 938 attrs = callPackage ../development/python-modules/attrs { };