1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 google-api-core, 6 google-cloud-storage, 7 google-cloud-testutils, 8 libcst, 9 mock, 10 pandas, 11 proto-plus, 12 protobuf, 13 pytest-asyncio, 14 pytestCheckHook, 15 pythonOlder, 16 setuptools, 17}: 18 19buildPythonPackage rec { 20 pname = "google-cloud-automl"; 21 version = "2.16.4"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchPypi { 27 pname = "google_cloud_automl"; 28 inherit version; 29 hash = "sha256-XVK9SF3RiPCejokDA8thyrJ910f8aQfSYdX9Wl3AgqM="; 30 }; 31 32 build-system = [ setuptools ]; 33 34 dependencies = [ 35 google-api-core 36 proto-plus 37 protobuf 38 ] 39 ++ google-api-core.optional-dependencies.grpc; 40 41 optional-dependencies = { 42 libcst = [ libcst ]; 43 pandas = [ pandas ]; 44 storage = [ google-cloud-storage ]; 45 }; 46 47 nativeCheckInputs = [ 48 google-cloud-storage 49 google-cloud-testutils 50 mock 51 pandas 52 pytest-asyncio 53 pytestCheckHook 54 ]; 55 56 preCheck = '' 57 # do not shadow imports 58 rm -r google 59 ''; 60 61 disabledTests = [ 62 # Test requires credentials 63 "test_prediction_client_client_info" 64 # Test requires project ID 65 "test_list_models" 66 ]; 67 68 pythonImportsCheck = [ 69 "google.cloud.automl" 70 "google.cloud.automl_v1" 71 "google.cloud.automl_v1beta1" 72 ]; 73 74 meta = with lib; { 75 description = "Cloud AutoML API client library"; 76 homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-automl"; 77 changelog = "https://github.com/googleapis/google-cloud-python/tree/google-cloud-automl-v${version}/packages/google-cloud-automl"; 78 license = licenses.asl20; 79 maintainers = [ ]; 80 }; 81}