about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aiooss2/default.nix
blob: 2d30e0422ef3fdecaa91c5228c156b10369dc83c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, oss2
, pytest-asyncio
, pytest-mock
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
, requests
, setuptools
, setuptools-scm
}:

buildPythonPackage rec {
  pname = "aiooss2";
  version = "0.2.9";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "karajan1001";
    repo = "aiooss2";
    rev = "refs/tags/${version}";
    hash = "sha256-LdH04pRioxpHY1amRO90l9l5540IsDxmQcrEUVSq8dk=";
  };

  pythonRelaxDeps = [
    "aiohttp"
    "oss2"
  ];

  nativeBuildInputs = [
    pythonRelaxDepsHook
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
    aiohttp
    oss2
  ];

  nativeCheckInputs = [
    pytest-mock
    pytest-asyncio
    pytestCheckHook
    requests
  ];

  pythonImportsCheck = [
    "aiooss2"
  ];

  disabledTestPaths = [
    # Tests require network access
    "tests/func/test_bucket.py"
    "tests/func/test_object.py"
    "tests/func/test_resumable.py"
    "tests/unit/test_adapter.py"
  ];

  meta = with lib; {
    description = "Library for aliyun OSS (Object Storage Service)";
    homepage = "https://github.com/karajan1001/aiooss2";
    changelog = "https://github.com/karajan1001/aiooss2/blob/${version}/CHANGES.txt";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
  };
}