Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkgs: add pystac package #520

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@
withSerialPort = true;
};

pystac = py.pkgs.callPackage ./pkgs/pystac { };

rasterio = py.pkgs.callPackage ./pkgs/rasterio {
inherit gdal shapely;
};
Expand All @@ -171,6 +173,7 @@
pyogrio
pyproj
pyqt5
pystac
rasterio
shapely
];
Expand Down
10 changes: 10 additions & 0 deletions overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ rec {

pyqt5 = geopkgs."${pythonVersion}-pyqt5"; # nothing to override here

#####################################################################
### PYTHON3-PYSTAC
#####################################################################

pystac = (geopkgs."${pythonVersion}-pystac".overrideAttrs (old: {

# >>> CUSTOMIZE HERE

})).override { };

#####################################################################
### PYTHON3-RASTERIO
#####################################################################
Expand Down
53 changes: 53 additions & 0 deletions pkgs/pystac/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,

html5lib,
jsonschema,
pytest-cov,
pytest-mock,
pytest-recording,
python-dateutil,
requests-mock,
setuptools,
}:

buildPythonPackage rec {
pname = "pystac";
version = "1.10.1";
pyproject = true;
disabled = pythonOlder "3.9";

src = fetchFromGitHub {
owner = "stac-utils";
repo = "pystac";
rev = "v${version}";
hash = "sha256-zJGDhKRX50Muo1YDEzfwypMLISnYBYKkPvUULYkUf68=";
};

build-system = [ setuptools ];

propagatedBuildInputs = [ python-dateutil ];

nativeCheckInputs = [
html5lib
jsonschema
pytestCheckHook
pytest-cov
pytest-mock
pytest-recording
requests-mock
];

pythonImportsCheck = [ "pystac" ];

meta = {
description = "Python library for working with any SpatioTemporal Asset Catalog (STAC)";
homepage = "https://github.com/stac-utils/pystac";
license = lib.licenses.asl20;
maintainers = lib.teams.geospatial.members;
};
}
1 change: 1 addition & 0 deletions pkgs/pystac/nixpkgs/files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pkgs/development/python-modules/pystac/* pkgs/pystac/