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