Accepting request 605288 from devel:languages:python

- Add patch to not check for oauth appengine which we disable in
  openSUSE:
  * oauth-no-appengine.patch

- Fix fdupes call and run tests

- New upstream release (bsc#1088358)
  + Version 1.4.1
    - Added a check for the cryptography version before attempting to use it.
  + From version 1.4.0
    - Added `cryptography`-based RSA signer and verifier.
    - Added `google.oauth2.service_account.IDTokenCredentials`.
    - Improved documentation around ID Tokens
  + From version 1.3.0
    - Added ``google.oauth2.credentials.Credentials.from_authorized_user_file``.
    - Dropped direct pyasn1 dependency in favor of letting ``pyasn1-modules``
      specify the right version.
    - ``default()`` now checks for the project ID environment var before
      warning about missing project ID.
    - Fixed the docstrings for ``has_scopes()`` and ``with_scopes()``.
    - Fixed example in docstring for ``ReadOnlyScoped``.
    - Made ``transport.requests`` use timeouts and retries
      to improve reliability.

OBS-URL: https://build.opensuse.org/request/show/605288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-google-auth?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2018-05-10 13:48:29 +00:00 committed by Git OBS Bridge
commit b769b02772
5 changed files with 106 additions and 11 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7170435cf6aa451be7e96120b9e37e8dbc59d3e8f3bab5b57a8fabbb29bf3810
size 69797

3
google-auth-1.4.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9051802d3dae256036cca9e34633a32c0ed1427730d4ebc513dff91ec8b6dd45
size 74272

43
oauth-no-appengine.patch Normal file
View File

@ -0,0 +1,43 @@
Index: google-auth-1.4.1/tests/test__oauth2client.py
===================================================================
--- google-auth-1.4.1.orig/tests/test__oauth2client.py
+++ google-auth-1.4.1/tests/test__oauth2client.py
@@ -93,25 +93,6 @@ def mock_oauth2client_gae_imports(mock_n
mock_non_existent_module('webapp2')
-@mock.patch('google.auth.app_engine.app_identity')
-def test__convert_appengine_app_assertion_credentials(
- app_identity, mock_oauth2client_gae_imports):
-
- import oauth2client.contrib.appengine
-
- service_account_id = 'service_account_id'
- old_credentials = oauth2client.contrib.appengine.AppAssertionCredentials(
- scope='one two', service_account_id=service_account_id)
-
- new_credentials = (
- _oauth2client._convert_appengine_app_assertion_credentials(
- old_credentials))
-
- assert new_credentials.scopes == ['one', 'two']
- assert (new_credentials._service_account_id ==
- old_credentials.service_account_id)
-
-
class FakeCredentials(object):
pass
@@ -143,12 +124,6 @@ def reset__oauth2client_module():
reload_module(_oauth2client)
-def test_import_has_app_engine(
- mock_oauth2client_gae_imports, reset__oauth2client_module):
- reload_module(_oauth2client)
- assert _oauth2client._HAS_APPENGINE
-
-
def test_import_without_oauth2client(monkeypatch, reset__oauth2client_module):
monkeypatch.setitem(sys.modules, 'oauth2client', None)
with pytest.raises(ImportError) as excinfo:

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Tue May 8 10:23:49 UTC 2018 - tchvatal@suse.com
- Add patch to not check for oauth appengine which we disable in
openSUSE:
* oauth-no-appengine.patch
-------------------------------------------------------------------
Mon May 7 13:56:36 UTC 2018 - tchvatal@suse.com
- Fix fdupes call and run tests
-------------------------------------------------------------------
Mon May 7 12:58:39 UTC 2018 - adrian.glaubitz@suse.com
- New upstream release (bsc#1088358)
+ Version 1.4.1
- Added a check for the cryptography version before attempting to use it.
+ From version 1.4.0
- Added `cryptography`-based RSA signer and verifier.
- Added `google.oauth2.service_account.IDTokenCredentials`.
- Improved documentation around ID Tokens
+ From version 1.3.0
- Added ``google.oauth2.credentials.Credentials.from_authorized_user_file``.
- Dropped direct pyasn1 dependency in favor of letting ``pyasn1-modules``
specify the right version.
- ``default()`` now checks for the project ID environment var before
warning about missing project ID.
- Fixed the docstrings for ``has_scopes()`` and ``with_scopes()``.
- Fixed example in docstring for ``ReadOnlyScoped``.
- Made ``transport.requests`` use timeouts and retries
to improve reliability.
-------------------------------------------------------------------
Sun Nov 19 15:22:10 UTC 2017 - mc@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-google-auth
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,31 +18,45 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-google-auth
Version: 1.2.1
Version: 1.4.1
Release: 0
Summary: Google Authentication Library
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/GoogleCloudPlatform/google-auth-library-python
Source: https://pypi.python.org/packages/83/f2/9dc87be31962a58c84e844c1f47d52a4e2811ba2e15253a036be3ae8acd8/google-auth-%{version}.tar.gz
URL: https://github.com/GoogleCloudPlatform/google-auth-library-python
Source: https://files.pythonhosted.org/packages/source/g/google-auth/google-auth-%{version}.tar.gz
Patch0: oauth-no-appengine.patch
BuildRequires: %{python_module Flask}
BuildRequires: %{python_module cachetools}
BuildRequires: %{python_module cryptography}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module oauth2client-gce}
BuildRequires: %{python_module oauth2client}
BuildRequires: %{python_module pyasn1-modules}
BuildRequires: %{python_module pyasn1}
BuildRequires: %{python_module pytest-localserver}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module rsa}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six}
BuildRequires: %{python_module urllib3}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Flask
Requires: python-cachetools
Requires: python-cryptography
Requires: python-oauth2client
Requires: python-oauth2client-gce
Requires: python-pyasn1
Requires: python-pyasn1-modules
Requires: python-requests
Requires: python-rsa
Requires: python-setuptools
Requires: python-six
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: python-urllib3
BuildArch: noarch
%python_subpackages
%description
@ -50,16 +64,21 @@ This library simplifies using Googles various server-to-server authentication
%prep
%setup -q -n google-auth-%{version}
%patch0 -p1
%build
%python_build
%install
%python_install
%fdupes %{buildroot}%{_prefix}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand py.test-%{$python_bin_suffix}
%files %{python_files}
%defattr(-,root,root,-)
%license LICENSE
%doc README.rst
%{python_sitelib}/*
%changelog