Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchPypi 4, google-api-core 5, google-cloud-storage 6, google-cloud-testutils 7, libcst 8, mock 9, pandas 10, proto-plus 11, protobuf 12, pytest-asyncio 13, pytestCheckHook 14, pythonOlder 15}: 16 17buildPythonPackage rec { 18 pname = "google-cloud-automl"; 19 version = "2.11.1"; 20 format = "setuptools"; 21 22 disabled = pythonOlder "3.7"; 23 24 src = fetchPypi { 25 inherit pname version; 26 hash = "sha256-MFYWx791WDdZLClul+f/hNHeTEmlQWEJw5zLs5FVgh8="; 27 }; 28 29 propagatedBuildInputs = [ 30 google-api-core 31 proto-plus 32 protobuf 33 ] ++ google-api-core.optional-dependencies.grpc; 34 35 passthru.optional-dependencies = { 36 libcst = [ 37 libcst 38 ]; 39 pandas = [ 40 pandas 41 ]; 42 storage = [ 43 google-cloud-storage 44 ]; 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 disabledTestPaths = [ 62 # requires credentials 63 "tests/system/gapic/v1beta1/test_system_tables_client_v1.py" 64 ]; 65 66 disabledTests = [ 67 # requires credentials 68 "test_prediction_client_client_info" 69 ]; 70 71 pythonImportsCheck = [ 72 "google.cloud.automl" 73 "google.cloud.automl_v1" 74 "google.cloud.automl_v1beta1" 75 ]; 76 77 meta = with lib; { 78 description = "Cloud AutoML API client library"; 79 homepage = "https://github.com/googleapis/python-automl"; 80 changelog = "https://github.com/googleapis/python-automl/blob/v${version}/CHANGELOG.md"; 81 license = licenses.asl20; 82 maintainers = with maintainers; [ SuperSandro2000 ]; 83 }; 84}