From 56ec187b2e4ab70973733ecd06fc8b2436b49e37 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Mon, 26 Aug 2024 11:44:03 +0200 Subject: [PATCH] python3Packages.pystac-client: init at 0.8.3 Co-authored-by: OTABI Tomoya --- .../python-modules/pystac-client/default.nix | 62 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/development/python-modules/pystac-client/default.nix diff --git a/pkgs/development/python-modules/pystac-client/default.nix b/pkgs/development/python-modules/pystac-client/default.nix new file mode 100644 index 000000000000..841e0f91b45e --- /dev/null +++ b/pkgs/development/python-modules/pystac-client/default.nix @@ -0,0 +1,62 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + pythonOlder, + + pystac, + pytest-benchmark, + pytest-console-scripts, + pytest-mock, + pytest-recording, + python-dateutil, + requests, + requests-mock, + setuptools, +}: + +buildPythonPackage rec { + pname = "pystac-client"; + version = "0.8.3"; + pyproject = true; + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "stac-utils"; + repo = "pystac-client"; + rev = "v${version}"; + hash = "sha256-tzfpvNtj+KkKjA75En+OwxYQWGzxHLACLkzWT2j/ThU="; + }; + + build-system = [ setuptools ]; + + dependencies = [ + pystac + python-dateutil + requests + ]; + + nativeCheckInputs = [ + pytest-benchmark + pytestCheckHook + pytest-console-scripts + pytest-mock + pytest-recording + requests-mock + ]; + + pytestFlagsArray = [ + # Tests accessing Internet + "-m 'not vcr'" + ]; + + pythonImportsCheck = [ "pystac_client" ]; + + meta = { + description = "A Python client for working with STAC Catalogs and APIs"; + homepage = "https://github.com/stac-utils/pystac-client"; + license = lib.licenses.asl20; + maintainers = lib.teams.geospatial.members; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7fca1b3036eb..4977e9d34fa5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10501,6 +10501,8 @@ self: super: with self; { pystac = callPackage ../development/python-modules/pystac { }; + pystac-client = callPackage ../development/python-modules/pystac-client { }; + pysubs2 = callPackage ../development/python-modules/pysubs2 { }; pysuez = callPackage ../development/python-modules/pysuez { };