|
|
|
@ -3,131 +3,47 @@
|
|
|
|
|
# Share doc between python- and python3-
|
|
|
|
|
%global _docdir_fmt %{name}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
|
|
|
|
%bcond_without python3
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with python3
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} < 7
|
|
|
|
|
%bcond_without python2
|
|
|
|
|
%else
|
|
|
|
|
%bcond_with python2
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Version: 4.1.2
|
|
|
|
|
Release: 6%{?dist}
|
|
|
|
|
Version: 4.1.3
|
|
|
|
|
Release: 27%{?dist}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
License: ASL 2.0
|
|
|
|
|
License: Apache-2.0
|
|
|
|
|
URL: https://github.com/google/%{srcname}
|
|
|
|
|
Source0: https://github.com/google/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
|
|
|
|
Patch0: docs-build-fix.patch
|
|
|
|
|
Patch1: rsa-to-cryptography.patch
|
|
|
|
|
Patch1: doc-fix.patch
|
|
|
|
|
Patch2: keyring-remove.patch
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
#BuildRequires: %{_bindir}/tox
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: pytest
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
BuildRequires: python2-fasteners
|
|
|
|
|
BuildRequires: python2-six >= 1.6.1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
# Needed for docs build
|
|
|
|
|
BuildRequires: pyOpenSSL
|
|
|
|
|
BuildRequires: python-crypto
|
|
|
|
|
BuildRequires: python2-django1.11
|
|
|
|
|
BuildRequires: python-jsonpickle
|
|
|
|
|
BuildRequires: python-flask
|
|
|
|
|
BuildRequires: python2-gflags
|
|
|
|
|
BuildRequires: python-httplib2
|
|
|
|
|
BuildRequires: python-keyring
|
|
|
|
|
BuildRequires: python-mock
|
|
|
|
|
BuildRequires: python-nose
|
|
|
|
|
BuildRequires: python2-pyasn1 >= 0.1.7
|
|
|
|
|
BuildRequires: python2-pyasn1-modules >= 0.0.5
|
|
|
|
|
BuildRequires: python2-cryptography >= 1.7.2
|
|
|
|
|
BuildRequires: python-sqlalchemy
|
|
|
|
|
BuildRequires: python-tox
|
|
|
|
|
BuildRequires: python-unittest2
|
|
|
|
|
BuildRequires: python-webtest
|
|
|
|
|
# RHEL 7 has too old a version of python-sphinx
|
|
|
|
|
BuildRequires: python-sphinx > 1.3
|
|
|
|
|
BuildRequires: python-sphinx_rtd_theme
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
# For tests only
|
|
|
|
|
#BuildRequires: python3-fasteners
|
|
|
|
|
#BuildRequires: python3-mock
|
|
|
|
|
#BuildRequires: python3-pyasn1 >= 0.1.7
|
|
|
|
|
#BuildRequires: python3-pyasn1-modules >= 0.0.5
|
|
|
|
|
#BuildRequires: python3-tox
|
|
|
|
|
#BuildRequires: python3-pytest
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python3-fasteners
|
|
|
|
|
BuildRequires: python3-pyasn1 >= 0.1.7
|
|
|
|
|
BuildRequires: python3-pyasn1-modules >= 0.0.5
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
This is a python client module for accessing resources protected by OAuth 2.0
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
|
|
|
|
|
Requires: pyOpenSSL
|
|
|
|
|
Requires: python2-gflags
|
|
|
|
|
Requires: python-httplib2
|
|
|
|
|
Requires: python-keyring
|
|
|
|
|
Requires: python2-pyasn1 >= 0.1.7
|
|
|
|
|
Requires: python2-pyasn1-modules >= 0.0.5
|
|
|
|
|
Requires: python2-cryptography >= 1.7.2
|
|
|
|
|
Requires: python2-fasteners
|
|
|
|
|
Requires: python2-six >= 1.6.1
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname}
|
|
|
|
|
This is a python client module for accessing resources protected by OAuth 2.0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: %{sum}
|
|
|
|
|
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
|
|
|
|
|
|
|
Requires: python3-pyOpenSSL
|
|
|
|
|
Requires: python3-gflags
|
|
|
|
|
Requires: python3-fasteners
|
|
|
|
|
Requires: python3-httplib2 >= 0.9.1
|
|
|
|
|
#Requires: python3-keyring
|
|
|
|
|
Requires: python3-pyasn1 >= 0.1.7
|
|
|
|
|
Requires: python3-pyasn1-modules >= 0.0.5
|
|
|
|
|
Requires: python3-cryptography >= 1.7.2
|
|
|
|
|
Requires: python3-six >= 1.6.1
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
|
This is a python client module for accessing resources protected by OAuth 2.0
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for python oauth2client
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
|
The python-oauth2client-doc package provides the documentation
|
|
|
|
|
for the package. Documentation is shipped in html format.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{srcname}-%{version}
|
|
|
|
|
%patch0 -p1 -b .doc
|
|
|
|
|
%patch1 -p1
|
|
|
|
|
%patch -P0 -p1 -b .doc
|
|
|
|
|
%patch -P1 -p1 -b .doc2
|
|
|
|
|
%patch -P2 -p1 -b .keyring
|
|
|
|
|
|
|
|
|
|
# Remove the version constraint on httplib2. From reading upstream's git log,
|
|
|
|
|
# it seems the only reason they require a new version is to force python3
|
|
|
|
@ -138,89 +54,135 @@ sed -i 's/httplib2>=0.9.1/httplib2/' setup.py
|
|
|
|
|
# This is removed because it breaks the docs build otherwise
|
|
|
|
|
rm -f docs/source/oauth2client.contrib.appengine.rst oauth2client/appengine.py
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
rm -rf %{py2dir}
|
|
|
|
|
cp -a . %{py2dir}
|
|
|
|
|
%endif
|
|
|
|
|
# Remove keyring support
|
|
|
|
|
rm oauth2client/contrib/keyring_storage.py tests/contrib/test_keyring_storage.py docs/source/oauth2client.contrib.keyring_storage.rst
|
|
|
|
|
|
|
|
|
|
# Remove deprecated PyPI mock dependency, replacing it with unittest.mock. See
|
|
|
|
|
# https://fedoraproject.org/wiki/Changes/DeprecatePythonMock. Since
|
|
|
|
|
# oauth2client is deprecated/archived upstream, this patch must be
|
|
|
|
|
# downstream-only. The find-then-modify pattern keeps us from discarding mtimes
|
|
|
|
|
# on any sources that do not need modification.
|
|
|
|
|
find docs tests -type f \( -name '*.py' -o -name '*.py.doc' \) -exec \
|
|
|
|
|
gawk '/^import mock$/ { print FILENAME; nextfile }' '{}' '+' |
|
|
|
|
|
xargs -r -t sed -r -i 's/^import mock$/from unittest &/'
|
|
|
|
|
sed -r -i 's/\bmock.*//' tox.ini
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%py3_build
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
export PYTHONPATH=`pwd`
|
|
|
|
|
pushd docs
|
|
|
|
|
# Not running with smp_flags as sometimes sphinx fails when run
|
|
|
|
|
# with parallel make
|
|
|
|
|
make html
|
|
|
|
|
popd
|
|
|
|
|
unset PYTHONPATH
|
|
|
|
|
rm -vr docs/_build/html/_sources
|
|
|
|
|
rm -vr docs/_build/html/_static/fonts
|
|
|
|
|
rm -v docs/_build/html/{.buildinfo,objects.inv}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
pushd %{py2dir}
|
|
|
|
|
%py2_build
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%py3_install
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
pushd %{py2dir}
|
|
|
|
|
%py2_install
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
pushd %{py2dir}
|
|
|
|
|
tox -v --sitepackages -e py27
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
#python3-tox --sitepackages -e py35
|
|
|
|
|
%endif
|
|
|
|
|
#tox -v --sitepackages -e py%%{python3_version_nodots}
|
|
|
|
|
|
|
|
|
|
# We remove tests currently, we will ship them eventually
|
|
|
|
|
# This is a bit of a hack until I package the test scripts in a separate package
|
|
|
|
|
rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python2}
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
|
|
|
|
%{python2_sitelib}/%{srcname}
|
|
|
|
|
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%files doc
|
|
|
|
|
%doc docs/_build/html
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGELOG.md CONTRIBUTING.md README.md
|
|
|
|
|
%{python3_sitelib}/%{srcname}
|
|
|
|
|
%{python3_sitelib}/%{srcname}*.egg-info
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Jul 30 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.2-6
|
|
|
|
|
- Use FIPS 140-2 compliant RSA library
|
|
|
|
|
* Thu Dec 26 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 4.1.3-27
|
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
|
|
|
|
|
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-27
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 4.1.3-26
|
|
|
|
|
- Rebuilt for Python 3.13
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-25
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-24
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-23
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 4.1.3-22
|
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
|
|
|
|
|
* Wed Jun 07 2023 Jan Friesse <jfriesse@redhat.com> - 4.1.3-21
|
|
|
|
|
- migrated to SPDX license
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-20
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-19
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.1.3-18
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
* Fri Feb 11 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.1.3-17
|
|
|
|
|
- Remove dependency on deprecated PyPI mock
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-16
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-15
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.1.3-14
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-13
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-12
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.1.3-11
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Jan 15 2020 Gwyn Ciesla <gwync@protonmail.com> - 4.1.3-9
|
|
|
|
|
- Don't BR tox if we don't run tests.
|
|
|
|
|
|
|
|
|
|
* Sat Oct 26 2019 Orion Poplawski <orion@nwra.com> - 4.1.3-8
|
|
|
|
|
- Drop py3dir
|
|
|
|
|
- Drop obsolete dependency on python-gflags
|
|
|
|
|
|
|
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.3-7
|
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
|
|
|
|
|
* Sat Aug 24 2019 Gwyn Ciesla <gwync@protonmail.com> - 4.1.3-6
|
|
|
|
|
- Drop Python 2.
|
|
|
|
|
|
|
|
|
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.3-5
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Apr 30 2019 Miro Hrončok <mhroncok@redhat.com> - 4.1.3-3
|
|
|
|
|
- Don't ship docs, use python2 names to declare Python 2 dependencies
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jan 21 2019 Michele Baldessari <michele@acksyn.org> - 4.1.3-1
|
|
|
|
|
- New upstream
|
|
|
|
|
- Disable keyring requires as python-keyring is gone
|
|
|
|
|
|
|
|
|
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1.2-6
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Tue Jun 05 2018 Troy Dawson <tdawson@redhat.com> - 4.1.2-5.1
|
|
|
|
|
- Do not do python2 in RHEL8
|
|
|
|
|
* Tue May 08 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1.2-5
|
|
|
|
|
- Fix BuildRequires to require the tox command and not the python2 module
|
|
|
|
|
|
|
|
|
|
* Wed Mar 21 2018 Michele Baldessari <michele@acksyn.org> - 4.1.2-4
|
|
|
|
|
- Fix FTBFS due to missing python-django (rhbz#1556223)
|
|
|
|
|