1{ lib
2, aliyun-python-sdk-core
3, aliyun-python-sdk-kms
4, aliyun-python-sdk-sts
5, buildPythonPackage
6, crcmod
7, fetchFromGitHub
8, mock
9, pycryptodome
10, pytestCheckHook
11, pythonOlder
12, pythonRelaxDepsHook
13, requests
14, six
15}:
16
17buildPythonPackage rec {
18 pname = "oss2";
19 version = "2.16.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "aliyun";
26 repo = "aliyun-oss-python-sdk";
27 rev = version;
28 hash = "sha256-Q8U7zMlqpKSoW99MBm9p0AnrGZY7M9oRNImMNJaEjSw=";
29 };
30
31 nativeBuildInputs = [
32 pythonRelaxDepsHook
33 ];
34
35 propagatedBuildInputs = [
36 requests
37 crcmod
38 pycryptodome
39 aliyun-python-sdk-kms
40 aliyun-python-sdk-core
41 six
42 ];
43
44 checkInputs = [
45 aliyun-python-sdk-sts
46 mock
47 pytestCheckHook
48 ];
49
50 pythonRelaxDeps = true;
51
52 pythonImportsCheck = [
53 "oss2"
54 ];
55
56 disabledTestPaths = [
57 # Tests require network access
58 "tests/test_api_base.py"
59 "tests/test_async_fetch_task.py"
60 "tests/test_bucket_cname.py"
61 "tests/test_bucket_inventory.py"
62 "tests/test_bucket_meta_query.py"
63 "tests/test_bucket_replication.py"
64 "tests/test_bucket_transfer_acceleration.py"
65 "tests/test_bucket_versioning.py"
66 "tests/test_bucket_worm.py"
67 "tests/test_bucket.py"
68 "tests/test_chinese.py"
69 "tests/test_crc64_combine.py"
70 "tests/test_credentials_provider.py"
71 "tests/test_crypto_multipart.py"
72 "tests/test_crypto_object.py"
73 "tests/test_crypto.py"
74 "tests/test_download.py"
75 "tests/test_headers.py"
76 "tests/test_image.py"
77 "tests/test_init.py"
78 "tests/test_iterator.py"
79 "tests/test_lifecycle_versioning.py"
80 "tests/test_list_objects_v2.py"
81 "tests/test_live_channel.py"
82 "tests/test_multipart.py"
83 "tests/test_object_request_payment_versions.py"
84 "tests/test_object_request_payment.py"
85 "tests/test_object_versioning.py"
86 "tests/test_object.py"
87 "tests/test_proxy.py"
88 "tests/test_put_object_chunked.py"
89 "tests/test_qos_info.py"
90 "tests/test_request_payment.py"
91 "tests/test_select_csv_object.py"
92 "tests/test_select_json_object.py"
93 "tests/test_server_side_encryotion.py"
94 "tests/test_sign.py"
95 "tests/test_traffic_limit.py"
96 "tests/test_upload.py"
97 "tests/test_utils.py"
98 "tests/test_website.py"
99 ];
100
101 disabledTests = [
102 "test_crypto_get_compact_deprecated_kms"
103 ];
104
105 meta = with lib; {
106 description = "Alibaba Cloud OSS SDK for Python";
107 homepage = "https://github.com/aliyun/aliyun-oss-python-sdk";
108 license = licenses.mit;
109 maintainers = with maintainers; [ fab ];
110 };
111}