about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sacremoses/default.nix
blob: 63584a0437783dfbede1ff093e42a6baf35c00ff (plain) (blame)
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
{ buildPythonPackage
, lib
, fetchFromGitHub
, click
, six
, tqdm
, joblib
, pytest
}:

buildPythonPackage rec {
  pname = "sacremoses";
  version = "0.0.35";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "alvations";
    repo = pname;
    rev = version;
    sha256 = "1gzr56w8yx82mn08wax5m0xyg15ym4ri5l80gmagp8r53443j770";
  };

  propagatedBuildInputs = [ click six tqdm joblib ];

  nativeCheckInputs = [ pytest ];
  # ignore tests which call to remote host
  checkPhase = ''
    pytest -k 'not truecase'
  '';

  meta = with lib; {
    homepage = "https://github.com/alvations/sacremoses";
    description = "Python port of Moses tokenizer, truecaser and normalizer";
    license = licenses.lgpl21Plus;
    platforms = platforms.unix;
    maintainers = with maintainers; [ pashashocky ];
  };
}