1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pyjwt,
6 pytestCheckHook,
7 python-dateutil,
8 pythonAtLeast,
9 pythonOlder,
10 requests,
11 responses,
12 setuptools,
13}:
14
15buildPythonPackage rec {
16 pname = "ibm-cloud-sdk-core";
17 version = "3.20.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.8";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-CqbZcEP1ianvRRpx527KBjQTjvGBzlSmoKY1Pe5MXRA=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 pyjwt
31 python-dateutil
32 requests
33 ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 responses
38 ];
39
40 disabledTests =
41 [
42 # Various tests try to access credential files which are not included with the source distribution
43 "test_configure_service"
44 "test_cp4d_authenticator"
45 "test_cwd"
46 "test_files_dict"
47 "test_files_duplicate_parts"
48 "test_files_list"
49 "test_get_authenticator"
50 "test_gzip_compression_external"
51 "test_iam"
52 "test_read_external_sources_2"
53 "test_retry_config_external"
54 # assertion error due to requests brotli support
55 "test_http_client"
56 ]
57 ++ lib.optionals (pythonAtLeast "3.12") [
58 # Tests are blocking or failing
59 "test_abstract_class_instantiation"
60 "test_abstract_class_instantiation"
61 ];
62
63 disabledTestPaths = [
64 "test/test_container_token_manager.py"
65 # Tests require credentials
66 "test_integration/"
67 ];
68
69 meta = with lib; {
70 description = "Client library for the IBM Cloud services";
71 homepage = "https://github.com/IBM/python-sdk-core";
72 changelog = "https://github.com/IBM/python-sdk-core/blob/v${version}/CHANGELOG.md";
73 license = licenses.asl20;
74 maintainers = with maintainers; [ globin ];
75 };
76}