python3Packages.google_cloud_storage: fix tests
This commit is contained in:
parent
d0b54015df
commit
d19278d5ee
@ -1,13 +1,7 @@
|
|||||||
{ lib
|
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
|
||||||
, buildPythonPackage
|
, google_api_core, google_auth, google-cloud-iam, google_cloud_core
|
||||||
, fetchPypi
|
, google_cloud_kms, google_cloud_testutils, google_resumable_media, mock
|
||||||
, google_resumable_media
|
, requests }:
|
||||||
, google_api_core
|
|
||||||
, google_cloud_core
|
|
||||||
, pytest
|
|
||||||
, mock
|
|
||||||
, setuptools
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "google-cloud-storage";
|
pname = "google-cloud-storage";
|
||||||
@ -18,27 +12,36 @@ buildPythonPackage rec {
|
|||||||
sha256 = "da12b7bd79bbe978a7945a44b600604fbc10ece2935d31f243e751f99135e34f";
|
sha256 = "da12b7bd79bbe978a7945a44b600604fbc10ece2935d31f243e751f99135e34f";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.5";
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
google_api_core
|
google_api_core
|
||||||
|
google_auth
|
||||||
google_cloud_core
|
google_cloud_core
|
||||||
google_resumable_media
|
google_resumable_media
|
||||||
setuptools
|
requests
|
||||||
];
|
];
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
|
google-cloud-iam
|
||||||
|
google_cloud_kms
|
||||||
|
google_cloud_testutils
|
||||||
mock
|
mock
|
||||||
pytest
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
# remove directory from interferring with importing modules
|
# disable tests which require credentials
|
||||||
# ignore tests which require credentials
|
disabledTests = [ "create" "get" "post" "test_build_api_url" ];
|
||||||
checkPhase = ''
|
|
||||||
|
# prevent google directory from shadowing google imports
|
||||||
|
# remove tests which require credentials
|
||||||
|
preCheck = ''
|
||||||
rm -r google
|
rm -r google
|
||||||
pytest tests/unit -k 'not (create or get or post)'
|
rm tests/system/test_system.py tests/unit/test_client.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Google Cloud Storage API client library";
|
description = "Google Cloud Storage API client library";
|
||||||
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
|
homepage = "https://github.com/googleapis/python-storage";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ costrouc ];
|
maintainers = with maintainers; [ costrouc ];
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user