From 860e49b3327c3cf7ec03d8c59d24062b49c73588 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Thu, 1 Aug 2019 14:27:08 -0700 Subject: [PATCH] python3Packages.fints: 2.1.1 -> 2.2.0 --- .../python-modules/fints/default.nix | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/fints/default.nix b/pkgs/development/python-modules/fints/default.nix index 4d9d250815a..f780c76fd6d 100644 --- a/pkgs/development/python-modules/fints/default.nix +++ b/pkgs/development/python-modules/fints/default.nix @@ -1,20 +1,36 @@ -{ stdenv, buildPythonPackage, fetchPypi, - requests, mt-940, sepaxml, bleach, isPy3k }: +{ stdenv, buildPythonPackage, fetchFromGitHub, isPy27 +, bleach +, mt-940 +, pytest +, requests +, sepaxml +}: buildPythonPackage rec { - version = "2.1.1"; + version = "2.2.0"; pname = "fints"; - disabled = !isPy3k; + disabled = isPy27; - src = fetchPypi { - inherit pname version; - sha256 = "06p6p0xxw0n10hmf7z4k1l29fya0sja433s6lasjr1bal5asdhaq"; + src = fetchFromGitHub { + owner = "raphaelm"; + repo = "python-fints"; + rev = "v${version}"; + sha256 = "1gx173dzdprf3jsc7dss0xax8s6l2hr02qg9m5c4rksb3dl5fl8w"; }; + postPatch = '' + substituteInPlace setup.py \ + --replace 'sepaxml==2.0.*' 'sepaxml~=2.0' + ''; + propagatedBuildInputs = [ requests mt-940 sepaxml bleach ]; - # no tests included in PyPI package - doCheck = false; + checkInputs = [ pytest ]; + + # ignore network calls and broken fixture + checkPhase = '' + pytest . --ignore=tests/test_client.py -k 'not robust_mode' + ''; meta = with stdenv.lib; { homepage = https://github.com/raphaelm/python-fints/;