From 6f9982c2d969a585dcebae579210d5792d38f7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 7 Oct 2021 20:44:48 +0200 Subject: [PATCH] python39Packages.paste: enable tests --- .../python-modules/paste/default.nix | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/paste/default.nix b/pkgs/development/python-modules/paste/default.nix index 71b670b707cc..c3a082c6c230 100644 --- a/pkgs/development/python-modules/paste/default.nix +++ b/pkgs/development/python-modules/paste/default.nix @@ -1,34 +1,42 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , six -, pytest-runner -, pytest +, pytestCheckHook }: buildPythonPackage rec { pname = "paste"; version = "3.5.0"; - src = fetchPypi { - pname = "Paste"; - inherit version; - sha256 = "17f3zppjjprs2jnklvzkz23mh9jdn6b1f445mvrjdm4ivi15q28v"; + src = fetchFromGitHub { + owner = "cdent"; + repo = "paste"; + rev = version; + sha256 = "sha256-yaOxbfQ8rdViepxhdF0UzlelC/ozdsP1lOdU5w4OPEQ="; }; - propagatedBuildInputs = [ six ]; - - checkInputs = [ pytest-runner pytest ]; - - # Certain tests require network - checkPhase = '' - py.test -k "not test_cgiapp and not test_proxy" + postPatch = '' + patchShebangs tests/cgiapp_data/ ''; + # propagatedBuildInputs = [ six ]; + + checkInputs = [ pytestCheckHook ]; + + disabledTests = [ + # broken test + "test_file_cache" + # requires network connection + "test_proxy_to_website" + ]; + + pythonNamespaces = [ "paste" ]; + meta = with lib; { description = "Tools for using a Web Server Gateway Interface stack"; homepage = "http://pythonpaste.org/"; license = licenses.mit; + maintainers = with maintainers; [ ]; }; - }