1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 oss2,
7 pytest-asyncio,
8 pytest-mock,
9 pytestCheckHook,
10 pythonOlder,
11 pythonRelaxDepsHook,
12 requests,
13 setuptools,
14 setuptools-scm,
15}:
16
17buildPythonPackage rec {
18 pname = "aiooss2";
19 version = "0.2.11";
20 pyproject = true;
21
22 disabled = pythonOlder "3.8";
23
24 src = fetchFromGitHub {
25 owner = "karajan1001";
26 repo = "aiooss2";
27 rev = "refs/tags/${version}";
28 hash = "sha256-6tkJG6Jjvo2OaN9cRbs/7ApcrKiZ5tGSPUfugAx7iJU=";
29 };
30
31 pythonRelaxDeps = [
32 "aiohttp"
33 "oss2"
34 ];
35
36 build-system = [
37 setuptools
38 setuptools-scm
39 ];
40
41 nativeBuildInputs = [ pythonRelaxDepsHook ];
42
43 dependencies = [
44 aiohttp
45 oss2
46 ];
47
48 nativeCheckInputs = [
49 pytest-mock
50 pytest-asyncio
51 pytestCheckHook
52 requests
53 ];
54
55 pythonImportsCheck = [ "aiooss2" ];
56
57 disabledTestPaths = [
58 # Tests require network access
59 "tests/func/test_bucket.py"
60 "tests/func/test_object.py"
61 "tests/func/test_resumable.py"
62 "tests/unit/test_adapter.py"
63 ];
64
65 meta = with lib; {
66 description = "Library for aliyun OSS (Object Storage Service)";
67 homepage = "https://github.com/karajan1001/aiooss2";
68 changelog = "https://github.com/karajan1001/aiooss2/blob/${version}/CHANGES.txt";
69 license = licenses.asl20;
70 maintainers = with maintainers; [ fab ];
71 };
72}