1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 google-api-core, 6 grpc-google-iam-v1, 7 libcst, 8 mock, 9 proto-plus, 10 protobuf, 11 pytest-asyncio, 12 pytestCheckHook, 13 pythonOlder, 14}: 15 16buildPythonPackage rec { 17 pname = "google-cloud-iot"; 18 version = "2.9.2"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.7"; 22 23 src = fetchPypi { 24 inherit pname version; 25 hash = "sha256-pLQgcwR89F+9jcSDtW/5+6Gy+Wk7XQf4iD49vDPkN9U="; 26 }; 27 28 propagatedBuildInputs = [ 29 google-api-core 30 grpc-google-iam-v1 31 libcst 32 proto-plus 33 protobuf 34 ] 35 ++ google-api-core.optional-dependencies.grpc; 36 37 nativeCheckInputs = [ 38 mock 39 pytest-asyncio 40 pytestCheckHook 41 ]; 42 43 # including_default_value_fields was deprecated, the new version is called 44 # always_print_fields_with_no_presence 45 postPatch = '' 46 substituteInPlace "tests/unit/gapic/iot_v1/test_device_manager.py" \ 47 --replace-fail "including_default_value_fields" "always_print_fields_with_no_presence" 48 substituteInPlace "google/cloud/iot_v1/services/device_manager/transports/rest.py" \ 49 --replace-fail "including_default_value_fields" "always_print_fields_with_no_presence" 50 ''; 51 52 disabledTests = [ 53 # requires credentials 54 "test_list_device_registries" 55 ]; 56 57 pythonImportsCheck = [ 58 "google.cloud.iot" 59 "google.cloud.iot_v1" 60 ]; 61 62 meta = with lib; { 63 description = "Cloud IoT API API client library"; 64 homepage = "https://github.com/googleapis/python-iot"; 65 changelog = "https://github.com/googleapis/python-iot/blob/v${version}/CHANGELOG.md"; 66 license = licenses.asl20; 67 maintainers = [ ]; 68 }; 69}