pythonPackages.google_cloud_automl: CLeanups

This commit is contained in:
Sandro Jäckel 2021-01-05 16:43:21 +01:00
parent d09275671a
commit 557dbd85e8
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,6 +1,16 @@
{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, pytestCheckHook, libcst
, google_api_core, google_cloud_storage, google_cloud_testutils, pandas
, proto-plus, pytest-asyncio, mock }:
{ stdenv
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, libcst
, google_api_core
, google_cloud_storage
, google_cloud_testutils
, pandas
, proto-plus
, pytest-asyncio
, mock
}:
buildPythonPackage rec {
pname = "google-cloud-automl";
@ -11,7 +21,7 @@ buildPythonPackage rec {
sha256 = "520dfe2ee04d28f3088c9c582fa2a534fc272647d5e2e59acc903c0152e61696";
};
disabled = pythonOlder "3.6";
propagatedBuildInputs = [ google_api_core libcst proto-plus ];
checkInputs = [
google_cloud_storage
@ -21,19 +31,29 @@ buildPythonPackage rec {
pytest-asyncio
pytestCheckHook
];
propagatedBuildInputs = [ google_api_core libcst proto-plus ];
# ignore tests which need credentials
disabledTests = [ "test_prediction_client_client_info" ];
preCheck = ''
# do not shadow imports
rm -r google
# requires credentials
rm tests/system/gapic/v1beta1/test_system_tables_client_v1.py
'';
disabledTests = [
# requires credentials
"test_prediction_client_client_info"
];
pythonImportsCheck = [
"google.cloud.automl"
"google.cloud.automl_v1"
"google.cloud.automl_v1beta1"
];
meta = with stdenv.lib; {
description = "Cloud AutoML API client library";
homepage = "https://github.com/googleapis/python-automl";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ SuperSandro2000 ];
};
}