git.iko.soy/typeable/nixpkgs
on master help sign in
python.pkgs.mt-940: 4.10.0 -> 4.12.2
commit5fda32e6f1a683d4670a8b497f2feac3cf13fedd authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de> dateWed 19 Dec 2018, 10:23 (8 years ago) parenta9e654e
2 files changed+16−40
pkgs/development/python-modules/mt-940/default.nix+16−14 pkgs/development/python-modules/mt-940/no-coverage.patch−26
pkgs/development/python-modules/mt-940/default.nix+16−14
@@ -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}
pkgs/development/python-modules/mt-940/no-coverage.patchdeleted−26
@@ -1,26 +0,0 @@
1−diff --git a/pytest.ini b/pytest.ini
2−index fef28f5..f366331 100644
3−--- a/pytest.ini
4−+++ b/pytest.ini
5−@@ -4,10 +4,6 @@ python_files =
6− tests/*.py
7−
8− addopts =
9−- --cov mt940
10−- --cov-report term-missing
11−- --cov-report html
12−- --no-cov-on-fail
13− --doctest-modules
14− --pep8
15− --flakes
16−diff --git a/tests/requirements.txt b/tests/requirements.txt
17−index fc55572..e52cc28 100644
18−--- a/tests/requirements.txt
19−+++ b/tests/requirements.txt
20−@@ -3,6 +3,5 @@
21− -r ../docs/requirements.txt
22− pytest
23− pytest-cache
24−-pytest-cover
25− pytest-flakes
26− pytest-pep8