Merge pull request #202704 from fabaff/google-reauth

python310Packages.google-reauth: init at 0.1.1, python310Packages.google-apitools: init at 0.5.32, python310Packages.gcs-oauth2-boto-plugin: init at 3.0
This commit is contained in:
Fabian Affolter 2022-11-25 08:29:54 +01:00 committed by GitHub
commit cd0f8f2cd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 211 additions and 8 deletions

View file

@ -0,0 +1,66 @@
{ lib
, boto
, buildPythonPackage
, fasteners
, fetchFromGitHub
, freezegun
, google-reauth
, httplib2
, oauth2client
, pyopenssl
, pytestCheckHook
, pythonOlder
, pythonRelaxDepsHook
, retry_decorator
, rsa
, six
}:
buildPythonPackage rec {
pname = "gcs-oauth2-boto-plugin";
version = "3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "GoogleCloudPlatform";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-slTxh2j9VhLiSyiTmJIFFakzpzH/+mgilDRxx0VqqKQ=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "rsa==4.7.2" "rsa" \
--replace "version='2.7'" "version='${version}'"
'';
propagatedBuildInputs = [
boto
freezegun
google-reauth
httplib2
oauth2client
pyopenssl
retry_decorator
rsa
six
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"gcs_oauth2_boto_plugin"
];
meta = with lib; {
description = "Auth plugin allowing use the use of OAuth 2.0 credentials for Google Cloud Storage";
homepage = "https://github.com/GoogleCloudPlatform/gcs-oauth2-boto-plugin";
changelog = "https://github.com/GoogleCloudPlatform/gcs-oauth2-boto-plugin/releases/tag/v${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -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 ];
};
}

View file

@ -0,0 +1,46 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, mock
, oauth2client
, pytestCheckHook
, pythonOlder
, pyu2f
}:
buildPythonPackage rec {
pname = "google-reauth";
version = "0.1.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "Google";
repo = "google-reauth-python";
rev = "refs/tags/${version}";
hash = "sha256-J7GVh+iY+69rFzf4hN/KLFZMZ1/S3CL5TZ7SsP5Oy3g=";
};
propagatedBuildInputs = [
oauth2client
pyu2f
];
checkInputs = [
mock
pytestCheckHook
];
pythonImportsCheck = [
"google_reauth"
];
meta = with lib; {
description = "Auth plugin allowing use the use of OAuth 2.0 credentials for Google Cloud Storage";
homepage = "https://github.com/Google/google-reauth-python";
changelog = "https://github.com/google/google-reauth-python/releases/tag/${version}";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ fab ];
};
}

View file

@ -1,21 +1,36 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "retry_decorator";
pname = "retry-decorator";
version = "1.1.1";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "e1e8ad02e518fe11073f2ea7d80b6b8be19daa27a60a1838aff7c731ddcf2ebe";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "pnpnpn";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-0dZq4YbPcH4ItyMnpF7B20YYLtzwniJClBK9gRndU1M=";
};
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"retry_decorator"
];
meta = with lib; {
description = "Decorator for retrying when exceptions occur";
homepage = "https://github.com/pnpnpn/retry-decorator";
description = "Retry Decorator for python functions";
license = licenses.mit;
changelog = "https://github.com/pnpnpn/retry-decorator/releases/tag/v${version}";
license = with licenses; [ asl20 ];
};
}

View file

@ -3603,6 +3603,8 @@ self: super: with self; {
gcovr = callPackage ../development/python-modules/gcovr { };
gcs-oauth2-boto-plugin = callPackage ../development/python-modules/gcs-oauth2-boto-plugin { };
gcsfs = callPackage ../development/python-modules/gcsfs { };
gdal = toPythonModule (pkgs.gdal.override { python3 = python; });
@ -3787,6 +3789,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 { };
@ -3903,6 +3907,8 @@ self: super: with self; {
google-re2 = callPackage ../development/python-modules/google-re2 { };
google-reauth = callPackage ../development/python-modules/google-reauth { };
google-resumable-media = callPackage ../development/python-modules/google-resumable-media { };
googletrans = callPackage ../development/python-modules/googletrans { };