Restore use of bcond for python conditionals
This commit is contained in:
parent
ef8395cff1
commit
3ea2ad2426
@ -1,13 +1,13 @@
|
||||
%bcond_with jwcrypto
|
||||
%global with_python2 0
|
||||
%global with_python3 0
|
||||
|
||||
%if (0%{?fedora} > 0 && 0%{?fedora} < 32) || (0%{?rhel} > 0 && 0%{?rhel} <= 7)
|
||||
%global with_python2 1
|
||||
%bcond_without python2
|
||||
%bcond_without python3
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%global with_python3 1
|
||||
%bcond_with python2
|
||||
%bcond_without python3
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
Name: python-oauthlib
|
||||
Version: 2.0.1
|
||||
Release: 9%{?dist}
|
||||
Release: 10%{?dist}
|
||||
Summary: An implementation of the OAuth request-signing logic
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -52,7 +52,7 @@ 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.
|
||||
|
||||
%if 0%{with_python2}
|
||||
%if %{with python2}
|
||||
%package -n python2-oauthlib
|
||||
Summary: An implementation of the OAuth request-signing logic
|
||||
Group: Development/Libraries
|
||||
@ -88,7 +88,7 @@ library, write a thin veneer on top of OAuthLib and get OAuth support for
|
||||
very little effort.
|
||||
%endif # with python2
|
||||
|
||||
%if 0%{with_python3}
|
||||
%if %{with python3}
|
||||
%package -n python3-oauthlib
|
||||
Summary: An implementation of the OAuth request-signing logic
|
||||
Group: Development/Libraries
|
||||
@ -140,30 +140,30 @@ sed -i "s/'unittest2', //" setup.py
|
||||
rm -rf %{modname}.egg-info
|
||||
|
||||
%build
|
||||
%if 0%{with_python2}
|
||||
%if %{with python2}
|
||||
%py2_build
|
||||
%endif # with python2
|
||||
%if 0%{with_python3}
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%endif # with python3
|
||||
|
||||
%install
|
||||
%if 0%{with_python2}
|
||||
%if %{with python2}
|
||||
%py2_install
|
||||
%endif # with python2
|
||||
%if 0%{with_python3}
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%endif # with python3
|
||||
|
||||
%check
|
||||
%if 0%{with_python2}
|
||||
%if %{with python2}
|
||||
%{__python2} setup.py test
|
||||
%endif # with python2
|
||||
%if 0%{with_python3}
|
||||
%if %{with python3}
|
||||
%{__python3} setup.py test
|
||||
%endif # with python3
|
||||
|
||||
%if 0%{with_python2}
|
||||
%if %{with python2}
|
||||
%files -n python2-oauthlib
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
@ -171,7 +171,7 @@ rm -rf %{modname}.egg-info
|
||||
%{python2_sitelib}/%{modname}-%{version}*
|
||||
%endif # with python2
|
||||
|
||||
%if 0%{with_python3}
|
||||
%if %{with python3}
|
||||
%files -n python3-oauthlib
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
@ -180,6 +180,9 @@ rm -rf %{modname}.egg-info
|
||||
%endif # with python3
|
||||
|
||||
%changelog
|
||||
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-10
|
||||
- Restore use of bcond for python conditionals
|
||||
|
||||
* Tue Jul 10 2018 <jdennis@redhat.com> - 2.0.1-9
|
||||
- Unify spec file between Fedora and RHEL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user