diff --git a/pkgs/development/python-modules/pyshp/default.nix b/pkgs/development/python-modules/pyshp/default.nix index ac0473eeef38..ce4d09ba1748 100644 --- a/pkgs/development/python-modules/pyshp/default.nix +++ b/pkgs/development/python-modules/pyshp/default.nix @@ -1,19 +1,39 @@ -{ lib, buildPythonPackage, fetchPypi -, setuptools }: +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { - version = "2.3.0"; pname = "pyshp"; + version = "2.3.1"; + format = "setuptools"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-glBk6kA6zxNehGz4sJJEmUMOa+HNN6DzS+cTCQZhfTw="; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "GeospatialPython"; + repo = pname; + rev = version; + hash = "sha256-yfxhgk8a1rdpGVkE1sjJqT6tiFLimhu2m2SjGxLI6wo="; }; - pythonImportsCheck = [ "shapefile" ]; + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "shapefile" + ]; + + disabledTests = [ + # Requires network access + "test_reader_url" + ]; 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; [ ];