Skip to content

Commit 5a81a8e

Browse files
authored
python3Packages.planetary-computer: init at 1.0.0 (#383347)
2 parents ce7e63a + 28e6f92 commit 5a81a8e

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
6+
# build-system
7+
setuptools,
8+
9+
# dependencies
10+
click,
11+
packaging,
12+
pydantic,
13+
pystac,
14+
pystac-client,
15+
python-dotenv,
16+
pytz,
17+
requests,
18+
19+
# optional-dependencies
20+
adlfs,
21+
azure-storage-blob,
22+
23+
# test
24+
responses,
25+
pytestCheckHook,
26+
}:
27+
28+
buildPythonPackage rec {
29+
pname = "planetary-computer";
30+
version = "1.0.0";
31+
pyproject = true;
32+
33+
src = fetchFromGitHub {
34+
owner = "microsoft";
35+
repo = "planetary-computer-sdk-for-python";
36+
tag = "v${version}";
37+
hash = "sha256-FcTEXtZ2zZQ3i4zmwecaZHdaHni7UbHSF9TDKP/k4sw=";
38+
};
39+
40+
build-system = [
41+
setuptools
42+
];
43+
44+
dependencies = [
45+
click
46+
packaging
47+
pydantic
48+
pystac
49+
pystac-client
50+
python-dotenv
51+
pytz
52+
requests
53+
];
54+
55+
optional-dependencies = {
56+
adlfs = [ adlfs ];
57+
azure = [ azure-storage-blob ];
58+
all = lib.flatten (lib.attrValues (lib.filterAttrs (n: v: n != "all") optional-dependencies));
59+
};
60+
61+
pythonImportsCheck = [
62+
"planetary_computer"
63+
];
64+
65+
nativeCheckInputs = [
66+
responses
67+
pytestCheckHook
68+
] ++ optional-dependencies.all;
69+
70+
disabledTests = [
71+
# tests require network access
72+
"test_get_adlfs_filesystem"
73+
"test_get_container_client"
74+
"test_signing"
75+
];
76+
77+
meta = {
78+
description = "Planetary Computer SDK for Python";
79+
homepage = "https://github.com/microsoft/planetary-computer-sdk-for-python";
80+
changelog = "https://github.com/microsoft/planetary-computer-sdk-for-python/blob/v${version}/CHANGELOG.md";
81+
license = lib.licenses.mit;
82+
maintainers = with lib.maintainers; [ daspk04 ];
83+
mainProgram = "planetarycomputer";
84+
};
85+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11069,6 +11069,8 @@ self: super: with self; {
1106911069

1107011070
plaid-python = callPackage ../development/python-modules/plaid-python { };
1107111071

11072+
planetary-computer = callPackage ../development/python-modules/planetary-computer { };
11073+
1107211074
plantuml = callPackage ../development/python-modules/plantuml { };
1107311075

1107411076
plantuml-markdown = callPackage ../development/python-modules/plantuml-markdown {

0 commit comments

Comments
 (0)