summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-12-19 10:23:40 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-12-19 10:24:26 +0100
commit5fda32e6f1a683d4670a8b497f2feac3cf13fedd (patch)
tree90085e99da04d104c92e3ccdf1f719b17a049fb3 /pkgs
parenta9e654e1bd4fff55e54a49aebcd700da3cf7594e (diff)
downloadnixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.tar
nixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.tar.gz
nixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.tar.bz2
nixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.tar.lz
nixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.tar.xz
nixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.tar.zst
nixpkgs-5fda32e6f1a683d4670a8b497f2feac3cf13fedd.zip
python.pkgs.mt-940: 4.10.0 -> 4.12.2
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/mt-940/default.nix30
-rw-r--r--pkgs/development/python-modules/mt-940/no-coverage.patch26
2 files changed, 16 insertions, 40 deletions
diff --git a/pkgs/development/python-modules/mt-940/default.nix b/pkgs/development/python-modules/mt-940/default.nix
index 9b1a2df48bb..5c323068ddd 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 1617e6dd394..00000000000
--- 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