about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/google-auth-oauthlib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/google-auth-oauthlib/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/google-auth-oauthlib/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/google-auth-oauthlib/default.nix b/nixpkgs/pkgs/development/python-modules/google-auth-oauthlib/default.nix
new file mode 100644
index 000000000000..bdea58de8999
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/google-auth-oauthlib/default.nix
@@ -0,0 +1,44 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, isPy3k
+, click
+, mock
+, pytest
+, futures
+, google_auth
+, requests_oauthlib
+}:
+
+buildPythonPackage rec {
+  pname = "google-auth-oauthlib";
+  version = "0.4.2";
+  disabled = pythonOlder "3.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "65b65bc39ad8cab15039b35e5898455d3d66296d0584d96fe0e79d67d04c51d9";
+  };
+
+  checkInputs = [
+    click mock pytest
+  ] ++ lib.optionals (!isPy3k) [ futures ];
+
+  propagatedBuildInputs = [
+    google_auth requests_oauthlib
+  ];
+
+  doCheck = isPy3k;
+  checkPhase = ''
+    rm -fr tests/__pycache__/ google
+    py.test
+  '';
+
+  meta = with lib; {
+    description = "Google Authentication Library: oauthlib integration";
+    homepage = "https://github.com/GoogleCloudPlatform/google-auth-library-python-oauthlib";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ terlar ];
+  };
+}