From e4b1f9e0f2e69a8caf53fb8054d531de929c104f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jul 2022 20:44:48 +0200 Subject: [PATCH] python310Packages.pyshp: enable tests --- .../python-modules/pyshp/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pyshp/default.nix b/pkgs/development/python-modules/pyshp/default.nix index 3100709004cf..ce4d09ba1748 100644 --- a/pkgs/development/python-modules/pyshp/default.nix +++ b/pkgs/development/python-modules/pyshp/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub +, pytestCheckHook , pythonOlder }: @@ -11,15 +12,26 @@ buildPythonPackage rec { disabled = pythonOlder "3.7"; - src = fetchPypi { - inherit pname version; - hash = "sha256-TK7IL9jdCW/rqCF4WAaLrLKjtZUPQ8BIxtwyo0idWvE="; + src = fetchFromGitHub { + owner = "GeospatialPython"; + repo = pname; + rev = version; + hash = "sha256-yfxhgk8a1rdpGVkE1sjJqT6tiFLimhu2m2SjGxLI6wo="; }; + checkInputs = [ + pytestCheckHook + ]; + pythonImportsCheck = [ "shapefile" ]; + disabledTests = [ + # Requires network access + "test_reader_url" + ]; + meta = with lib; { description = "Python read/write support for ESRI Shapefile format"; homepage = "https://github.com/GeospatialPython/pyshp";