Modernize python macros.
This commit is contained in:
parent
8b3cc27509
commit
24c7e9e6ee
@ -30,14 +30,27 @@ Source0: http://pypi.python.org/packages/source/o/%{modname}/%{modnam
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python-setuptools
|
|
||||||
|
|
||||||
BuildRequires: python-nose
|
%description
|
||||||
BuildRequires: python-unittest2
|
OAuthLib is a generic utility which implements the logic of OAuth without
|
||||||
BuildRequires: python-mock
|
assuming a specific HTTP request object or web framework. Use it to graft
|
||||||
BuildRequires: python-blinker
|
OAuth client support onto your favorite HTTP library, or provider support
|
||||||
BuildRequires: python-jwt >= 1.0
|
onto your favourite web framework. If you're a maintainer of such a
|
||||||
|
library, write a thin veneer on top of OAuthLib and get OAuth support for
|
||||||
|
very little effort.
|
||||||
|
|
||||||
|
%package -n python2-oauthlib
|
||||||
|
Summary: An implementation of the OAuth request-signing logic
|
||||||
|
Group: Development/Libraries
|
||||||
|
%{?python_provide:%python_provide python2-oauthlib}
|
||||||
|
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
|
||||||
|
BuildRequires: python2-nose
|
||||||
|
BuildRequires: python2-mock
|
||||||
|
BuildRequires: python2-blinker
|
||||||
|
BuildRequires: python2-jwt >= 1.0
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
%if 0%{?rhel} && 0%{?rhel} <= 6
|
||||||
BuildRequires: python-crypto2.6
|
BuildRequires: python-crypto2.6
|
||||||
@ -47,20 +60,7 @@ BuildRequires: python-crypto >= 2.6
|
|||||||
Requires: python-crypto >= 2.6
|
Requires: python-crypto >= 2.6
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Provides: python2-oauthlib = %{version}
|
%description -n python2-oauthlib
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
|
|
||||||
BuildRequires: python3-nose
|
|
||||||
BuildRequires: python3-crypto >= 2.6
|
|
||||||
BuildRequires: python3-mock
|
|
||||||
BuildRequires: python3-blinker
|
|
||||||
BuildRequires: python3-jwt >= 1.0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
|
||||||
OAuthLib is a generic utility which implements the logic of OAuth without
|
OAuthLib is a generic utility which implements the logic of OAuth without
|
||||||
assuming a specific HTTP request object or web framework. Use it to graft
|
assuming a specific HTTP request object or web framework. Use it to graft
|
||||||
OAuth client support onto your favorite HTTP library, or provider support
|
OAuth client support onto your favorite HTTP library, or provider support
|
||||||
@ -72,6 +72,16 @@ very little effort.
|
|||||||
%package -n python3-oauthlib
|
%package -n python3-oauthlib
|
||||||
Summary: An implementation of the OAuth request-signing logic
|
Summary: An implementation of the OAuth request-signing logic
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
|
%{?python_provide:%python_provide python3-oauthlib}
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
|
BuildRequires: python3-nose
|
||||||
|
BuildRequires: python3-crypto >= 2.6
|
||||||
|
BuildRequires: python3-mock
|
||||||
|
BuildRequires: python3-blinker
|
||||||
|
BuildRequires: python3-jwt >= 1.0
|
||||||
|
|
||||||
Requires: python3-crypto >= 2.6
|
Requires: python3-crypto >= 2.6
|
||||||
|
|
||||||
@ -100,48 +110,42 @@ rm -rf %{modname}.egg-info
|
|||||||
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"pycrypto>=2.6\"]; import pkg_resources"}1' setup.py > setup.py.tmp
|
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"pycrypto>=2.6\"]; import pkg_resources"}1' setup.py > setup.py.tmp
|
||||||
mv setup.py.tmp setup.py
|
mv setup.py.tmp setup.py
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
|
||||||
rm -rf %{py3dir}
|
|
||||||
cp -a . %{py3dir}
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python2} setup.py build
|
%py2_build
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%py3_build
|
||||||
%{__python3} setup.py build
|
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%py2_install
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
%py3_install
|
||||||
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python2} setup.py test
|
%{__python2} setup.py test
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
|
||||||
%{__python3} setup.py test
|
%{__python3} setup.py test
|
||||||
popd
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files -n python2-oauthlib
|
||||||
%doc README.rst LICENSE
|
%doc README.rst
|
||||||
|
%license LICENSE
|
||||||
%{python2_sitelib}/%{modname}/
|
%{python2_sitelib}/%{modname}/
|
||||||
%{python2_sitelib}/%{modname}-%{version}*
|
%{python2_sitelib}/%{modname}-%{version}*
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-oauthlib
|
%files -n python3-oauthlib
|
||||||
%doc README.rst LICENSE
|
%doc README.rst
|
||||||
|
%license LICENSE
|
||||||
%{python3_sitelib}/%{modname}/
|
%{python3_sitelib}/%{modname}/
|
||||||
%{python3_sitelib}/%{modname}-%{version}-*
|
%{python3_sitelib}/%{modname}-%{version}-*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 28 2016 Ralph Bean <rbean@redhat.com> - 1.0.3-2
|
||||||
|
- Modernize python macros.
|
||||||
|
|
||||||
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 1.0.3-1
|
* Sun Apr 10 2016 Kevin Fenzi <kevin@scrye.com> - 1.0.3-1
|
||||||
- Update to 1.0.3
|
- Update to 1.0.3
|
||||||
- Add python2 provides (fixes bug #1313235 and #1314349)
|
- Add python2 provides (fixes bug #1313235 and #1314349)
|
||||||
|
Loading…
Reference in New Issue
Block a user