From b8882c701d2e7ac6ae3a8d7850e82303b6271b5d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 25 Jan 2022 11:06:54 +0100 Subject: [PATCH] python3Packages.weboob: disable failing tests --- .../python-modules/weboob/default.nix | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/weboob/default.nix b/pkgs/development/python-modules/weboob/default.nix index b1afa242107e..4d0373105ccf 100644 --- a/pkgs/development/python-modules/weboob/default.nix +++ b/pkgs/development/python-modules/weboob/default.nix @@ -1,9 +1,9 @@ -{ lib, buildPythonPackage, fetchPypi, isPy27 +{ lib , Babel +, buildPythonPackage , cssselect -, python-dateutil , feedparser -, futures ? null +, fetchPypi , gdata , gnupg , google-api-python-client @@ -16,6 +16,9 @@ , pillow , prettytable , pyqt5 +, pytestCheckHook +, python-dateutil +, pythonOlder , pyyaml , requests , simplejson @@ -26,28 +29,18 @@ buildPythonPackage rec { pname = "weboob"; version = "2.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; sha256 = "1c69vzf8sg8471lcaafpz9iw2q3rfj5hmcpqrs2k59fkgbvy32zw"; }; - postPatch = '' - # Disable doctests that require networking: - sed -i -n -e '/^ *def \+pagination *(.*: *$/ { - p; n; p; /"""\|'\'\'\'''/!b - - :loop - n; /^ *\(>>>\|\.\.\.\)/ { h; bloop } - x; /^ *\(>>>\|\.\.\.\)/bloop; x - p; /"""\|'\'\'\'''/b - bloop - }; p' weboob/browser/browsers.py weboob/browser/pages.py - ''; - - checkInputs = [ nose ]; - - nativeBuildInputs = [ pyqt5 ]; + nativeBuildInputs = [ + pyqt5 + ]; propagatedBuildInputs = [ Babel @@ -70,15 +63,35 @@ buildPythonPackage rec { simplejson termcolor unidecode - ] ++ lib.optionals isPy27 [ futures ]; + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "with-doctest = 1" "" \ + --replace "with-coverage = 1" "" \ + --replace "weboob.browser.filters.standard," "" \ + --replace "weboob.browser.tests.filters," "" \ + --replace "weboob.tools.application.formatters.json," "" \ + --replace "weboob.tools.application.formatters.table," "" \ + --replace "weboob.tools.capabilities.bank.transactions," "" + ''; + + checkInputs = [ + nose + ]; checkPhase = '' nosetests ''; - meta = { + pythonImportsCheck = [ + "weboob" + ]; + + meta = with lib; { + description = "Collection of applications and APIs to interact with websites"; homepage = "http://weboob.org"; - description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser"; - license = lib.licenses.agpl3; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ ]; }; }