aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/google_cloud_storage/default.nix
blob: a1b572db11e5a6e6c73b11a937aa79eccdaabe65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
, google_api_core, google_auth, google-cloud-iam, google_cloud_core
, google_cloud_kms, google_cloud_testutils, google_resumable_media, mock
, requests }:

buildPythonPackage rec {
  pname = "google-cloud-storage";
  version = "1.33.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "900ba027bdee6b97f21cd22d1db3d1a6233ede5de2db4754db860438bdad72d2";
  };

  disabled = pythonOlder "3.5";

  propagatedBuildInputs = [
    google_api_core
    google_auth
    google_cloud_core
    google_resumable_media
    requests
  ];
  checkInputs = [
    google-cloud-iam
    google_cloud_kms
    google_cloud_testutils
    mock
    pytestCheckHook
  ];

  # disable tests which require credentials
  disabledTests = [ "create" "get" "post" "test_build_api_url" ];

  # prevent google directory from shadowing google imports
  # remove tests which require credentials
  preCheck = ''
    rm -r google
    rm tests/system/test_system.py tests/unit/test_client.py
  '';

  meta = with lib; {
    description = "Google Cloud Storage API client library";
    homepage = "https://github.com/googleapis/python-storage";
    license = licenses.asl20;
    maintainers = with maintainers; [ costrouc ];
  };
}