From 965e3ae94c60a0415f0f78a9778ab1e7f0b08685 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 29 Jul 2022 06:00:45 +0000 Subject: [PATCH 1/3] python310Packages.pyshp: 2.3.0 -> 2.3.1 --- pkgs/development/python-modules/pyshp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyshp/default.nix b/pkgs/development/python-modules/pyshp/default.nix index ac0473eeef38..cd42a4a0a694 100644 --- a/pkgs/development/python-modules/pyshp/default.nix +++ b/pkgs/development/python-modules/pyshp/default.nix @@ -2,12 +2,12 @@ , setuptools }: buildPythonPackage rec { - version = "2.3.0"; + version = "2.3.1"; pname = "pyshp"; src = fetchPypi { inherit pname version; - sha256 = "sha256-glBk6kA6zxNehGz4sJJEmUMOa+HNN6DzS+cTCQZhfTw="; + sha256 = "sha256-TK7IL9jdCW/rqCF4WAaLrLKjtZUPQ8BIxtwyo0idWvE="; }; pythonImportsCheck = [ "shapefile" ]; From d04acdc3cc57b88b68db98b26473f077ba64e287 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jul 2022 20:17:53 +0200 Subject: [PATCH 2/3] python310Packages.pyshp: disable on older Python releases --- .../python-modules/pyshp/default.nix | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/pyshp/default.nix b/pkgs/development/python-modules/pyshp/default.nix index cd42a4a0a694..3100709004cf 100644 --- a/pkgs/development/python-modules/pyshp/default.nix +++ b/pkgs/development/python-modules/pyshp/default.nix @@ -1,19 +1,27 @@ -{ lib, buildPythonPackage, fetchPypi -, setuptools }: +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +}: buildPythonPackage rec { - version = "2.3.1"; pname = "pyshp"; + version = "2.3.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-TK7IL9jdCW/rqCF4WAaLrLKjtZUPQ8BIxtwyo0idWvE="; + hash = "sha256-TK7IL9jdCW/rqCF4WAaLrLKjtZUPQ8BIxtwyo0idWvE="; }; - pythonImportsCheck = [ "shapefile" ]; + pythonImportsCheck = [ + "shapefile" + ]; meta = with lib; { - description = "Pure Python read/write support for ESRI Shapefile format"; + description = "Python read/write support for ESRI Shapefile format"; homepage = "https://github.com/GeospatialPython/pyshp"; license = licenses.mit; maintainers = with maintainers; [ ]; From e4b1f9e0f2e69a8caf53fb8054d531de929c104f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 29 Jul 2022 20:44:48 +0200 Subject: [PATCH 3/3] 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";