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