From 5fda32e6f1a683d4670a8b497f2feac3cf13fedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Wed, 19 Dec 2018 10:23:40 +0100 Subject: [PATCH] python.pkgs.mt-940: 4.10.0 -> 4.12.2 --- .../python-modules/mt-940/default.nix | 30 ++++++++++--------- .../python-modules/mt-940/no-coverage.patch | 26 ---------------- 2 files changed, 16 insertions(+), 40 deletions(-) delete mode 100644 pkgs/development/python-modules/mt-940/no-coverage.patch diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix index 9b1a2df48bbb..5c323068dddb 100644 --- a/pkgs/development/python-modules/mt-940/default.nix +++ b/pkgs/development/python-modules/mt-940/default.nix @@ -1,35 +1,37 @@ -{ buildPythonPackage, stdenv, pytestrunner, pyyaml, pytest, enum34 -, pytestpep8, pytestflakes,fetchFromGitHub, isPy3k, lib, glibcLocales +{ buildPythonPackage, stdenv, pyyaml, pytest, enum34 +, pytestpep8, pytestflakes, fetchFromGitHub, isPy3k, lib, glibcLocales }: buildPythonPackage rec { - version = "4.10.0"; - pname = "mt940"; + version = "4.12.2"; + pname = "mt-940"; src = fetchFromGitHub { owner = "WoLpH"; - repo = pname; + repo = "mt940"; rev = "v${version}"; - sha256 = "1dsf2di8rr0iw2vaz6dppalby3y7i8x2bl0qjqvaiqacjxxvwj65"; + sha256 = "0l7q8v00dhpbc9mh6baaaqc55kf44rszygx28dq3pwp5b5x33nir"; }; - patches = [ - ./no-coverage.patch - ]; + postPatch = '' + # No coverage report + sed -i "/--\(no-\)\?cov/d" pytest.ini + ''; - propagatedBuildInputs = [ pyyaml pytestrunner ] - ++ lib.optional (!isPy3k) enum34; + propagatedBuildInputs = lib.optional (!isPy3k) enum34; LC_ALL="en_US.UTF-8"; - checkInputs = [ pytestpep8 pytestflakes pytest glibcLocales ]; + checkInputs = [ pyyaml pytestpep8 pytestflakes pytest glibcLocales ]; + + # See https://github.com/WoLpH/mt940/issues/64 for the disabled test checkPhase = '' - py.test + py.test -k "not mt940.models.FixedOffset" ''; meta = with stdenv.lib; { description = "A library to parse MT940 files and returns smart Python collections for statistics and manipulation"; - homepage = https://pythonhosted.org/mt-940/; + inherit (src.meta) homepage; license = licenses.bsd3; }; } diff --git a/pkgs/development/python-modules/mt-940/no-coverage.patch b/pkgs/development/python-modules/mt-940/no-coverage.patch deleted file mode 100644 index 1617e6dd3947..000000000000 --- a/pkgs/development/python-modules/mt-940/no-coverage.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/pytest.ini b/pytest.ini -index fef28f5..f366331 100644 ---- a/pytest.ini -+++ b/pytest.ini -@@ -4,10 +4,6 @@ python_files = - tests/*.py - - addopts = -- --cov mt940 -- --cov-report term-missing -- --cov-report html -- --no-cov-on-fail - --doctest-modules - --pep8 - --flakes -diff --git a/tests/requirements.txt b/tests/requirements.txt -index fc55572..e52cc28 100644 ---- a/tests/requirements.txt -+++ b/tests/requirements.txt -@@ -3,6 +3,5 @@ - -r ../docs/requirements.txt - pytest - pytest-cache --pytest-cover - pytest-flakes - pytest-pep8