@@ -1,35 +1,37 @@
1−{ buildPythonPackage, stdenv, pytestrunner, pyyaml, pytest, enum34
2−, pytestpep8, pytestflakes,fetchFromGitHub, isPy3k, lib, glibcLocales
1+{ buildPythonPackage, stdenv, pyyaml, pytest, enum34
2+, pytestpep8, pytestflakes, fetchFromGitHub, isPy3k, lib, glibcLocales
33}:
44
55buildPythonPackage rec {
6− version = "4.10.0";
7− pname = "mt940";
6+ version = "4.12.2";
7+ pname = "mt-940";
88
99 src = fetchFromGitHub {
1010 owner = "WoLpH";
11− repo = pname;
11+ repo = "mt940";
1212 rev = "v${version}";
13− sha256 = "1dsf2di8rr0iw2vaz6dppalby3y7i8x2bl0qjqvaiqacjxxvwj65";
13+ sha256 = "0l7q8v00dhpbc9mh6baaaqc55kf44rszygx28dq3pwp5b5x33nir";
1414 };
1515
16− patches = [
17− ./no-coverage.patch
18− ];
16+ postPatch = ''
17+ # No coverage report
18+ sed -i "/--\(no-\)\?cov/d" pytest.ini
19+ '';
1920
20− propagatedBuildInputs = [ pyyaml pytestrunner ]
21− ++ lib.optional (!isPy3k) enum34;
21+ propagatedBuildInputs = lib.optional (!isPy3k) enum34;
2222
2323 LC_ALL="en_US.UTF-8";
2424
25− checkInputs = [ pytestpep8 pytestflakes pytest glibcLocales ];
25+ checkInputs = [ pyyaml pytestpep8 pytestflakes pytest glibcLocales ];
26+
27+ # See https://github.com/WoLpH/mt940/issues/64 for the disabled test
2628 checkPhase = ''
27− py.test
29+ py.test -k "not mt940.models.FixedOffset"
2830 '';
2931
3032 meta = with stdenv.lib; {
3133 description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation";
32− homepage = https://pythonhosted.org/mt-940/;
34+ inherit (src.meta) homepage;
3335 license = licenses.bsd3;
3436 };
3537}