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