diff options
Diffstat (limited to 'pkgs/development/python-modules/csvkit/default.nix')
-rw-r--r-- | pkgs/development/python-modules/csvkit/default.nix | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/csvkit/default.nix b/pkgs/development/python-modules/csvkit/default.nix index bfabf4376e7a..7fbdaa8909d6 100644 --- a/pkgs/development/python-modules/csvkit/default.nix +++ b/pkgs/development/python-modules/csvkit/default.nix @@ -1,28 +1,38 @@ -{ stdenv, fetchPypi, buildPythonPackage, - dateutil, dbf, xlrd, sqlalchemy, openpyxl, - agate-excel, agate-dbf, agate-sql, isPy3k }: +{ lib, fetchPypi, buildPythonPackage, isPy3k +, agate, agate-excel, agate-dbf, agate-sql, six +, argparse, ordereddict, simplejson +, glibcLocales, nose, mock, unittest2 +}: buildPythonPackage rec { - name = "${pname}-${version}"; - pname = "csvkit"; - version = "1.0.2"; + pname = "csvkit"; + version = "1.0.3"; - src = fetchPypi { - inherit pname version; - sha256 = "05vfsba9nwh4islszgs18rq8sjkpzqni0cdwvvkw7pi0r63pz2as"; - }; + src = fetchPypi { + inherit pname version; + sha256 = "a6c859c1321d4697dc41252877249091681297f093e08d9c1e1828a6d52c260c"; + }; - propagatedBuildInputs = [ dateutil dbf xlrd sqlalchemy openpyxl - agate-excel agate-dbf agate-sql ]; + propagatedBuildInputs = [ + agate agate-excel agate-dbf agate-sql six + ] ++ lib.optionals (!isPy3k) [ + argparse ordereddict simplejson + ]; - doCheck = !isPy3k; - # (only) python 3 we had 9 failures and 57 errors out of a much larger - # number of tests. + checkInputs = [ + glibcLocales nose + ] ++ lib.optionals (!isPy3k) [ + mock unittest2 + ]; - meta = with stdenv.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; - }; + 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; + }; } |