summary refs log tree commit diff
path: root/pkgs/development/python-modules/csvkit/default.nix
blob: 7fbdaa8909d6d30f05b521da51537dee455d5476 (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
{ lib, fetchPypi, buildPythonPackage, isPy3k
, agate, agate-excel, agate-dbf, agate-sql, six
, argparse, ordereddict, simplejson
, glibcLocales, nose, mock, unittest2
}:

buildPythonPackage rec {
  pname = "csvkit";
  version = "1.0.3";

  src = fetchPypi {
    inherit pname version;
    sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c";
  };

  propagatedBuildInputs = [
    agate agate-excel agate-dbf agate-sql six
  ] ++ lib.optionals (!isPy3k) [
    argparse ordereddict simplejson
  ];

  checkInputs = [
    glibcLocales nose
  ] ++ lib.optionals (!isPy3k) [
    mock unittest2
  ];

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

  meta = with lib; {
    description = "A library of utilities for working with CSV, the king of tabular file formats";
    maintainers = with maintainers; [ vrthra ];
    license = with licenses; [ mit ];
    homepage = https://github.com/wireservice/csvkit;
  };
}