Blame SPECS/python-requests-oauthlib.spec

423fc7
%if 0%{?el6}%{?el7}
423fc7
    # python3 and python version related macros
423fc7
    # required to build python3- subpackage
423fc7
    # are not available in el6 and el7
423fc7
    %bcond_with python3
423fc7
    %{!?__python2: %global __python2 %{__python}}
423fc7
    %{!?python2_sitelib: %global python2_sitelib %{python_sitelib}}
423fc7
    %{!?py2_build: %global py2_build %{__python2} setup.py build --executable="%{__python2} -s" %{?*}}
423fc7
    %{!?py2_install: %global py2_install %{__python2} setup.py install --skip-build --root %{buildroot} %{?*}}
423fc7
%else
423fc7
    %bcond_without python3
423fc7
%endif
423fc7
423fc7
%global distname requests-oauthlib
423fc7
%global modname requests_oauthlib
423fc7
423fc7
Name:               python-requests-oauthlib
423fc7
Version:            0.8.0
423fc7
Release:            5%{?dist}
423fc7
Summary:            OAuthlib authentication support for Requests.
423fc7
423fc7
Group:              Development/Libraries
423fc7
License:            ISC
423fc7
URL:                http://pypi.python.org/pypi/requests-oauthlib
423fc7
Source0:            https://github.com/requests/requests-oauthlib/archive/v%{version}.tar.gz
423fc7
423fc7
BuildArch:          noarch
423fc7
423fc7
%description
423fc7
This project provides first-class OAuth library support for python-request.
423fc7
423fc7
%package -n python2-%{distname}
423fc7
%if 0%{?python_provide:1}
423fc7
%python_provide python2-%{distname}
423fc7
%else
423fc7
Provides: python-%{distname} = %{?epoch:%{epoch}:}%{version}-%{release}
423fc7
%endif
423fc7
423fc7
Summary:            OAuthlib authentication support for Requests.
423fc7
Group:              Development/Libraries
423fc7
423fc7
BuildRequires:      python2-devel
423fc7
BuildRequires:      python2-setuptools
423fc7
423fc7
BuildRequires:      python2-oauthlib >= 0.6.2
423fc7
BuildRequires:      python-requests >= 2.0.0
423fc7
423fc7
BuildRequires:      python-mock
423fc7
423fc7
Requires:           python2-oauthlib
423fc7
Requires:           python-requests >= 2.0.0
423fc7
423fc7
%description -n python2-%{distname}
423fc7
This project provides first-class OAuth library support for python-request.
423fc7
423fc7
%if 0%{?with_python3}
423fc7
%package -n python3-%{distname}
423fc7
%{?python_provide:%python_provide python3-%{distname}}
423fc7
Summary:            OAuthlib authentication support for Requests.
423fc7
Group:              Development/Libraries
423fc7
423fc7
BuildRequires:      python3-devel
423fc7
BuildRequires:      python3-setuptools
423fc7
423fc7
BuildRequires:      python3-oauthlib >= 0.6.2
423fc7
BuildRequires:      python3-requests >= 2.0.0
423fc7
423fc7
BuildRequires:      python3-mock
423fc7
423fc7
Requires:           python3-oauthlib
423fc7
Requires:           python3-requests
423fc7
423fc7
%description -n python3-%{distname}
423fc7
This project provides first-class OAuth library support for python-request.
423fc7
%endif
423fc7
423fc7
%prep
423fc7
%autosetup -n %{distname}-%{version}
423fc7
423fc7
# Remove bundled egg-info in case it exists
423fc7
rm -rf %{distname}.egg-info
423fc7
423fc7
423fc7
%build
423fc7
%py2_build
423fc7
%if 0%{?with_python3}
423fc7
%py3_build
423fc7
%endif
423fc7
423fc7
%install
423fc7
%py2_install
423fc7
%if 0%{?with_python3}
423fc7
%py3_install
423fc7
%endif
423fc7
423fc7
# Upstream doesn't actually ship the tests with the tarball.
423fc7
# https://github.com/requests/requests-oauthlib/pull/91
423fc7
#%%check
423fc7
#%%{__python2} setup.py test
423fc7
423fc7
%files -n python2-%{distname}
423fc7
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst
423fc7
%license LICENSE
423fc7
%{python2_sitelib}/%{modname}/
423fc7
%{python2_sitelib}/%{modname}-%{version}*
423fc7
423fc7
%if 0%{?with_python3}
423fc7
%files -n python3-%{distname}
423fc7
%doc README.rst HISTORY.rst requirements.txt AUTHORS.rst
423fc7
%license LICENSE
423fc7
%{python3_sitelib}/%{modname}/
423fc7
%{python3_sitelib}/%{modname}-%{version}*
423fc7
%endif
423fc7
423fc7
%changelog
423fc7
* Tue Apr 11 2017 John Dennis <jdennis@redhat.com> - 0.8.0-5
423fc7
- BuildRequires had python-requests but the Requires was still referencing
423fc7
  python2-requests which is not yet provided in RHEL 7.4.,
423fc7
  also add the missing version dependency on python-requests.
423fc7
  Resolves: rhbz#1401783
423fc7
423fc7
* Fri Apr  7 2017 John Dennis <jdennis@redhat.com> - 0.8.0-4
423fc7
- fix with_python3 conditional test
423fc7
  Resolves: rhbz#1401783
423fc7
423fc7
* Thu Apr  6 2017 John Dennis <jdennis@redhat.com> - 0.8.0-3
423fc7
- fix python provides
423fc7
  fix with_python3
423fc7
  Resolves: rhbz#1401783
423fc7
423fc7
* Tue Apr  4 2017 John Dennis <jdennis@redhat.com> - 0.8.0-2
423fc7
- Add Provides for unversioned python
423fc7
  Resolves: rhbz#1401783
423fc7
423fc7
* Fri Mar 17 2017 John Dennis <jdennis@redhat.com> - 0.8.0-1
423fc7
- Initial import for RHEL-7
423fc7
  Resolves: rhbz#1401783
423fc7