From 68abb937978c83c1d820afbb5cdd992c6780c449 Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Thu, 24 Nov 2022 17:01:14 +0100 Subject: [PATCH] python310Packages.google-apitools: init at 0.5.32 --- .../google-apitools/default.nix | 70 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/python-modules/google-apitools/default.nix diff --git a/pkgs/development/python-modules/google-apitools/default.nix b/pkgs/development/python-modules/google-apitools/default.nix new file mode 100644 index 000000000000..24b37fd722e7 --- /dev/null +++ b/pkgs/development/python-modules/google-apitools/default.nix @@ -0,0 +1,70 @@ +{ lib +, buildPythonPackage +, fasteners +, fetchFromGitHub +, gflags +, httplib2 +, mock +, oauth2client +, pytestCheckHook +, pythonOlder +, six +}: + +buildPythonPackage rec { + pname = "google-apitools"; + version = "0.5.32"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "google"; + repo = "apitools"; + rev = "refs/tags/v${version}"; + hash = "sha256-Z9BTDU6KKCcjspVLi5mJqVZMYEapnMXLPL5BXsIKZAw="; + }; + + propagatedBuildInputs = [ + fasteners + httplib2 + oauth2client + six + ]; + + passthru.optional-dependencies = { + cli = [ + gflags + ]; + }; + + checkInputs = [ + mock + pytestCheckHook + ]; + + pythonImportsCheck = [ + "apitools" + ]; + + disabledTests = [ + # AttributeError: 'FieldList' object has no attribute '_FieldList__field' + "testPickle" + "testDecodeBadBase64BytesField" + "testConvertIdThatNeedsEscaping" + "testGeneration" + ]; + + disabledTestPaths = [ + # Samples are partially postfixed with test + "samples" + ]; + + meta = with lib; { + description = "Collection of utilities to make it easier to build client-side tools"; + homepage = "https://github.com/google/apitools"; + changelog = "https://github.com/google/apitools/releases/tag/v${version}"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index efe6d856a098..0e1a93b31c29 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3785,6 +3785,8 @@ self: super: with self; { google-api-python-client = callPackage ../development/python-modules/google-api-python-client { }; + google-apitools = callPackage ../development/python-modules/google-apitools { }; + googleapis-common-protos = callPackage ../development/python-modules/googleapis-common-protos { }; google-auth = callPackage ../development/python-modules/google-auth { };