Blame SPECS/python-oauth2client.spec

169488
%global srcname oauth2client
169488
%global sum Python client library for OAuth 2.0
169488
# Share doc between python- and python3-
169488
%global _docdir_fmt %{name}
169488
169488
169488
%if 0%{?fedora} || 0%{?rhel} > 7
169488
%bcond_without python3
169488
%else
169488
%bcond_with python3
169488
%endif
169488
169488
%if 0%{?rhel} < 7
169488
%bcond_without python2
169488
%else
169488
%bcond_with python2
169488
%endif
169488
169488
Name:           python-%{srcname}
169488
Version:        4.1.2
169488
Release:        6%{?dist}
169488
Summary:        %{sum}
169488
169488
Group:          Development/Languages
169488
License:        ASL 2.0
169488
URL:            https://github.com/google/%{srcname}
169488
Source0:        https://github.com/google/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
169488
Patch0:         docs-build-fix.patch
169488
Patch1:         rsa-to-cryptography.patch
169488
169488
BuildArch:      noarch
169488
169488
%if %{with python2}
169488
BuildRequires:  python2-devel
169488
BuildRequires:  pytest
169488
BuildRequires:  python2-setuptools
169488
BuildRequires:  python2-fasteners
169488
BuildRequires:  python2-six >= 1.6.1
169488
%endif
169488
169488
%if 0%{?fedora}
169488
# Needed for docs build
169488
BuildRequires:  pyOpenSSL
169488
BuildRequires:  python-crypto
169488
BuildRequires:  python2-django1.11
169488
BuildRequires:  python-jsonpickle
169488
BuildRequires:  python-flask
169488
BuildRequires:  python2-gflags
169488
BuildRequires:  python-httplib2
169488
BuildRequires:  python-keyring
169488
BuildRequires:  python-mock
169488
BuildRequires:  python-nose
169488
BuildRequires:  python2-pyasn1 >= 0.1.7
169488
BuildRequires:  python2-pyasn1-modules >= 0.0.5
169488
BuildRequires:  python2-cryptography >= 1.7.2
169488
BuildRequires:  python-sqlalchemy
169488
BuildRequires:  python-tox
169488
BuildRequires:  python-unittest2
169488
BuildRequires:  python-webtest
169488
# RHEL 7 has too old a version of python-sphinx
169488
BuildRequires:  python-sphinx > 1.3
169488
BuildRequires:  python-sphinx_rtd_theme
169488
%endif
169488
169488
%if %{with python3}
169488
BuildRequires:  python3-setuptools
169488
BuildRequires:  python3-devel
169488
# For tests only
169488
#BuildRequires:  python3-fasteners
169488
#BuildRequires:  python3-mock
169488
#BuildRequires:  python3-pyasn1 >= 0.1.7
169488
#BuildRequires:  python3-pyasn1-modules >= 0.0.5
169488
#BuildRequires:  python3-tox
169488
#BuildRequires:  python3-pytest
169488
%endif
169488
169488
%description
169488
This is a python client module for accessing resources protected by OAuth 2.0
169488
169488
%if %{with python2}
169488
%package -n python2-%{srcname}
169488
Summary:        %{sum}
169488
%{?python_provide:%python_provide python2-%{srcname}}
169488
169488
Requires:       pyOpenSSL
169488
Requires:       python2-gflags
169488
Requires:       python-httplib2
169488
Requires:       python-keyring
169488
Requires:       python2-pyasn1 >= 0.1.7
169488
Requires:       python2-pyasn1-modules >= 0.0.5
169488
Requires:       python2-cryptography >= 1.7.2
169488
Requires:       python2-fasteners
169488
Requires:       python2-six >= 1.6.1
169488
169488
%description -n python2-%{srcname}
169488
This is a python client module for accessing resources protected by OAuth 2.0
169488
%endif
169488
169488
%if %{with python3}
169488
%package -n python3-%{srcname}
169488
Summary:        %{sum}
169488
%{?python_provide:%python_provide python3-%{srcname}}
169488
169488
Requires:       python3-pyOpenSSL
169488
Requires:       python3-gflags
169488
Requires:       python3-fasteners
169488
Requires:       python3-httplib2 >= 0.9.1
169488
#Requires:       python3-keyring
169488
Requires:       python3-pyasn1 >= 0.1.7
169488
Requires:       python3-pyasn1-modules >= 0.0.5
169488
Requires:       python3-cryptography >= 1.7.2
169488
Requires:       python3-six >= 1.6.1
169488
169488
%description -n python3-%{srcname}
169488
This is a python client module for accessing resources protected by OAuth 2.0
169488
%endif
169488
169488
%if 0%{?fedora}
169488
%package doc
169488
Summary:        Documentation for python oauth2client
169488
169488
%description doc
169488
The python-oauth2client-doc package provides the documentation
169488
for the package. Documentation is shipped in html format.
169488
%endif
169488
169488
%prep
169488
%setup -q -n %{srcname}-%{version}
169488
%patch0 -p1 -b .doc
169488
%patch1 -p1
169488
169488
# Remove the version constraint on httplib2.  From reading upstream's git log,
169488
# it seems the only reason they require a new version is to force python3
169488
# support.  That doesn't affect us on EPEL7, so we can loosen the constraint.
169488
sed -i 's/httplib2>=0.9.1/httplib2/' setup.py
169488
169488
# We do not have the package for google.appengine support
169488
# This is removed because it breaks the docs build otherwise
169488
rm -f docs/source/oauth2client.contrib.appengine.rst oauth2client/appengine.py
169488
169488
%if %{with python2}
169488
rm -rf %{py2dir}
169488
cp -a . %{py2dir}
169488
%endif
169488
169488
%build
169488
%if %{with python3}
169488
%py3_build
169488
%endif
169488
169488
%if 0%{?fedora}
169488
export PYTHONPATH=`pwd`
169488
pushd docs
169488
# Not running with smp_flags as sometimes sphinx fails when run
169488
# with parallel make
169488
make html
169488
popd
169488
unset PYTHONPATH
169488
rm -vr docs/_build/html/_sources
169488
rm -vr docs/_build/html/_static/fonts
169488
rm -v docs/_build/html/{.buildinfo,objects.inv}
169488
%endif
169488
169488
%if %{with python2}
169488
pushd %{py2dir}
169488
%py2_build
169488
%endif
169488
169488
%install
169488
%if %{with python3}
169488
%py3_install
169488
%endif
169488
169488
%if %{with python2}
169488
pushd %{py2dir}
169488
%py2_install
169488
popd
169488
%endif
169488
169488
%check
169488
169488
%if %{with python2}
169488
pushd %{py2dir}
169488
tox -v --sitepackages -e py27
169488
popd
169488
%endif
169488
169488
%if %{with python3}
169488
#python3-tox --sitepackages -e py35
169488
%endif
169488
169488
# We remove tests currently, we will ship them eventually
169488
# This is a bit of a hack until I package the test scripts in a separate package
169488
rm -r $(find %{_buildrootdir} -type d -name 'tests') || /bin/true
169488
169488
169488
%if %{with python2}
169488
%files -n python2-%{srcname}
169488
%license LICENSE
169488
%doc CHANGELOG.md CONTRIBUTING.md README.md 
169488
%{python2_sitelib}/%{srcname}
169488
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info
169488
%endif
169488
169488
%if 0%{?fedora}
169488
%files doc
169488
%doc docs/_build/html
169488
%endif
169488
169488
%if %{with python3}
169488
%files -n python3-%{srcname}
169488
%license LICENSE 
169488
%doc CHANGELOG.md CONTRIBUTING.md README.md 
169488
%{python3_sitelib}/%{srcname}
169488
%{python3_sitelib}/%{srcname}*.egg-info
169488
%endif
169488
169488
%changelog
169488
* Mon Jul 30 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.1.2-6
169488
- Use FIPS 140-2 compliant RSA library
169488
169488
* Tue Jun 05 2018 Troy Dawson <tdawson@redhat.com> - 4.1.2-5.1
169488
- Do not do python2 in RHEL8
169488
169488
* Wed Mar 21 2018 Michele Baldessari <michele@acksyn.org> - 4.1.2-4
169488
- Fix FTBFS due to missing python-django (rhbz#1556223)
169488
- Set right version in the docs
169488
169488
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-3
169488
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
169488
169488
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-2
169488
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
169488
169488
* Mon Jul 10 2017 Michele Baldessari <michele@acksyn.org> - 4.1.2-1
169488
- New upstream
169488
169488
* Sat May 13 2017 Michele Baldessari <michele@acksyn.org> - 4.1.0-1
169488
- New upstream
169488
169488
* Thu Mar 30 2017 Ralph Bean <rbean@redhat.com> - 4.0.0-2
169488
- Compat for EPEL7.
169488
169488
* Wed Mar 29 2017 Ralph Bean <rbean@redhat.com> - 4.0.0-1
169488
- new version
169488
169488
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-4
169488
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
169488
169488
* Tue Dec 27 2016 Michele Baldessari <michele@acksyn.org> - 3.0.0-3
169488
- Fix python 3.6 breakage
169488
169488
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 3.0.0-2
169488
- Rebuild for Python 3.6
169488
169488
* Thu Nov 10 2016 Michele Baldessari <michele@acksyn.org> - 3.0.0-1
169488
- New upstream
169488
169488
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-2
169488
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
169488
169488
* Sun May 22 2016 Michele Baldessari <michele@acksyn.org> - 2.1.0-1
169488
- New upstream
169488
* Tue Mar 08 2016 Michele Baldessari <michele@acksyn.org> - 2.0.1-1
169488
- New upstream (NB: for now I am not shipping the tests, to be revised later)
169488
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.2-3
169488
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
169488
* Thu Nov 26 2015 Michele Baldessari <michele@acksyn.org> - 1.5.2-2
169488
- Remove dependency on sphinx-contrib-napoleon now that sphinx is at version >= 1.3
169488
- Tighten versioned dependencies
169488
- Update to latest python policy
169488
* Thu Nov 19 2015 Michele Baldessari <michele@acksyn.org> - 1.5.2-1
169488
- New upstream (BZ 1283443)
169488
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-3
169488
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
169488
* Tue Oct 13 2015 Michele Baldessari <michele@acksyn.org> - 1.5.1-2
169488
- Add versioned requires as per setup.py
169488
* Thu Sep 17 2015 Michele Baldessari <michele@acksyn.org> - 1.5.1-1
169488
- New upstream (BZ#1263881)
169488
* Fri Sep 04 2015 Michele Baldessari <michele@acksyn.org> - 1.5.0-1
169488
- New upstream (BZ#1259966)
169488
* Sun Jul 12 2015 Michele Baldessari <michele@acksyn.org> - 1.4.12-1
169488
- New upstream (BZ#1241304)
169488
* Mon Jun 22 2015 Michele Baldessari <michele@acksyn.org> - 1.4.11-2
169488
- Use -O1 for python3 as well
169488
- Use python2 macros
169488
- Remove the extra fonts from the -doc package
169488
* Thu Jun 04 2015 Michele Baldessari <michele@acksyn.org> - 1.4.11-1
169488
- Initial packaging