summary refs log tree commit diff
path: root/pkgs/development/python-modules/agate/default.nix
blob: 29f580636480c047112cb1637856e55c5e61d919 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib
, babel
, buildPythonPackage
, cssselect
, fetchFromGitHub
, glibcLocales
, isodate
, leather
, lxml
, nose
, parsedatetime
, PyICU
, python-slugify
, pytimeparse
, pythonOlder
, pytz
, six
}:

buildPythonPackage rec {
  pname = "agate";
  version = "1.6.3";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "wireservice";
    repo = pname;
    rev = version;
    sha256 = "sha256-tuUoLvztCYHIPJTBgw1eByM0zfaHDyc+h7SWsxutKos=";
  };

  propagatedBuildInputs = [
    babel
    isodate
    leather
    parsedatetime
    python-slugify
    pytimeparse
    six
  ];

  checkInputs = [
    cssselect
    glibcLocales
    lxml
    nose
    PyICU
    pytz
  ];

  postPatch = ''
    # No Python 2 support, thus constraint is not needed
    substituteInPlace setup.py \
      --replace "'parsedatetime>=2.1,!=2.5,!=2.6'," "'parsedatetime>=2.1',"
  '';

  checkPhase = ''
    LC_ALL="en_US.UTF-8" nosetests tests
  '';

  pythonImportsCheck = [
    "agate"
  ];

  meta = with lib; {
    description = "Python data analysis library that is optimized for humans instead of machines";
    homepage = "https://github.com/wireservice/agate";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ vrthra ];
  };
}