1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jsonschema,
6 pytestCheckHook,
7 pythonOlder,
8 requests,
9 setuptools,
10}:
11
12buildPythonPackage rec {
13 pname = "oras";
14 version = "0.1.29";
15 pyproject = true;
16
17 disabled = pythonOlder "3.7";
18
19 src = fetchFromGitHub {
20 owner = "oras-project";
21 repo = "oras-py";
22 rev = "refs/tags/${version}";
23 hash = "sha256-ZV+J5zqRBRIddWdmLzzjpZi3M5E/HfkG8lWK9xzy5tw=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 jsonschema
30 requests
31 ];
32
33 nativeCheckInputs = [ pytestCheckHook ];
34
35 pythonImportsCheck = [ "oras" ];
36
37 disabledTests = [
38 # Test requires network access
39 "test_get_many_tags"
40 ];
41
42 meta = with lib; {
43 description = "ORAS Python SDK";
44 homepage = "https://github.com/oras-project/oras-py";
45 changelog = "https://github.com/oras-project/oras-py/blob/${version}/CHANGELOG.md";
46 license = licenses.asl20;
47 maintainers = with maintainers; [ fab ];
48 };
49}