diff options
author | Robert Schütz <robert.schuetz@stud.uni-heidelberg.de> | 2018-07-06 16:18:22 +0200 |
---|---|---|
committer | Robert Schütz <robert.schuetz@stud.uni-heidelberg.de> | 2018-07-06 16:22:51 +0200 |
commit | fda46a645c962a7ae01680a0a0e290a6f0b5de1b (patch) | |
tree | f1bd293ab494855993584b32ab40f7eae046f2c4 /pkgs/development/python-modules/agate | |
parent | 38bca8d36ff239e0dd0d09346a03645bd4e6c9c7 (diff) |
python.pkgs.agate: fix tests
Need to use fetchFromGitHub because examples/ is missing from PyPI tarball.
Also clean up the expression and specify appropriate checkInputs.
Fixes #42867.
Diffstat (limited to 'pkgs/development/python-modules/agate')
-rw-r--r-- | pkgs/development/python-modules/agate/default.nix | 49 |
1 files changed, 30 insertions, 19 deletions
diff --git a/pkgs/development/python-modules/agate/default.nix b/pkgs/development/python-modules/agate/default.nix index 57a34268df86..b0992141faa0 100644 --- a/pkgs/development/python-modules/agate/default.nix +++ b/pkgs/development/python-modules/agate/default.nix @@ -1,26 +1,37 @@ -{ stdenv, fetchPypi, buildPythonPackage, isPy3k, - discid, six, parsedatetime, isodate, Babel, pytimeparse, - leather, python-slugify }: +{ lib, fetchFromGitHub, buildPythonPackage, isPy3k +, six, pytimeparse, parsedatetime, Babel +, isodate, python-slugify, leather +, glibcLocales, nose, lxml, cssselect, unittest2 }: buildPythonPackage rec { - pname = "agate"; - version = "1.6.1"; + pname = "agate"; + version = "1.6.1"; - src = fetchPypi { - inherit pname version; - sha256 = "c93aaa500b439d71e4a5cf088d0006d2ce2c76f1950960c8843114e5f361dfd3"; - }; + # PyPI tarball does not include all test files + # https://github.com/wireservice/agate/pull/716 + src = fetchFromGitHub { + owner = "wireservice"; + repo = pname; + rev = version; + sha256 = "077zj8xad8hsa3nqywvf7ircirmx3krxdipl8wr3dynv3l3khcpl"; + }; - propagatedBuildInputs = [ discid six parsedatetime - isodate Babel pytimeparse leather python-slugify ]; + propagatedBuildInputs = [ + six pytimeparse parsedatetime Babel + isodate python-slugify leather + ]; - doCheck = !isPy3k; - # (only) on python3 unittest loader (loadTestsFromModule) fails + checkInputs = [ glibcLocales nose lxml cssselect ] + ++ lib.optional (!isPy3k) unittest2; - meta = with stdenv.lib; { - description = "A 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 ]; - }; + checkPhase = '' + LC_ALL="en_US.UTF-8" nosetests tests + ''; + + meta = with lib; { + description = "A 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 ]; + }; } |