Enable EPEL PY3 build

This commit is contained in:
Carl George 2018-04-05 00:11:01 -05:00
parent 282f835b69
commit c77283f1c6

View File

@ -1,7 +1,3 @@
%if 0%{?fedora} || 0%{?rhel} > 7
%global with_python3 1
%endif
%global _docdir_fmt %{name} %global _docdir_fmt %{name}
%global srcname jwt %global srcname jwt
%global sum JSON Web Token implementation in Python %global sum JSON Web Token implementation in Python
@ -23,12 +19,10 @@ BuildRequires: python2-setuptools
BuildRequires: python2-cryptography >= 1.4.0 BuildRequires: python2-cryptography >= 1.4.0
BuildRequires: python2-pytest BuildRequires: python2-pytest
%if 0%{?with_python3} BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python3-devel BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python3-setuptools BuildRequires: python%{python3_pkgversion}-cryptography >= 1.4.0
BuildRequires: python3-cryptography >= 1.4.0 BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python3-pytest
%endif
%description %description
A Python implementation of JSON Web Token draft 01. This library provides a A Python implementation of JSON Web Token draft 01. This library provides a
@ -47,18 +41,16 @@ means of representing signed content using JSON data structures, including
claims to be transferred between two parties encoded as digitally signed and claims to be transferred between two parties encoded as digitally signed and
encrypted JSON objects. encrypted JSON objects.
%if 0%{?with_python3} %package -n python%{python3_pkgversion}-%{srcname}
%package -n python3-%{srcname}
Summary: %{sum} Summary: %{sum}
%{?python_provide:%python_provide python3-%{srcname}} Requires: python%{python3_pkgversion}-cryptography >= 1.4.0
Requires: python3-cryptography >= 1.4.0 %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python3-%{srcname} %description -n python%{python3_pkgversion}-%{srcname}
A Python3 implementation of JSON Web Token draft 01. This library provides a A Python3 implementation of JSON Web Token draft 01. This library provides a
means of representing signed content using JSON data structures, including means of representing signed content using JSON data structures, including
claims to be transferred between two parties encoded as digitally signed and claims to be transferred between two parties encoded as digitally signed and
encrypted JSON objects. encrypted JSON objects.
%endif
%prep %prep
%autosetup -n pyjwt-%{version} -p 1 %autosetup -n pyjwt-%{version} -p 1
@ -67,21 +59,15 @@ rm setup.cfg
%build %build
%py2_build %py2_build
%if 0%{?with_python3}
%py3_build %py3_build
%endif
%install %install
%py2_install %py2_install
%if 0%{?with_python3}
%py3_install %py3_install
%endif
%check %check
py.test-%{python2_version} --verbose py.test-%{python2_version} --verbose
%if 0%{?with_python3}
py.test-%{python3_version} --verbose py.test-%{python3_version} --verbose
%endif
%files -n python2-jwt %files -n python2-jwt
%doc README.rst AUTHORS %doc README.rst AUTHORS
@ -89,20 +75,19 @@ py.test-%{python3_version} --verbose
%{python2_sitelib}/%{srcname}/ %{python2_sitelib}/%{srcname}/
%{python2_sitelib}/PyJWT-%{version}* %{python2_sitelib}/PyJWT-%{version}*
%if 0%{?with_python3} %files -n python%{python3_pkgversion}-jwt
%files -n python3-jwt
%doc README.rst AUTHORS %doc README.rst AUTHORS
%license LICENSE %license LICENSE
%{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}/
%{python3_sitelib}/PyJWT-%{version}* %{python3_sitelib}/PyJWT-%{version}*
%{_bindir}/pyjwt %{_bindir}/pyjwt
%endif
%changelog %changelog
* Thu Apr 05 2018 Carl George <carl@george.computer> - 1.6.1-1 * Thu Apr 05 2018 Carl George <carl@george.computer> - 1.6.1-1
- Latest upstream - Latest upstream
- Add patch0 to remove pytest-{cov,runner} deps - Add patch0 to remove pytest-{cov,runner} deps
- Share doc and license dir between subpackages - Share doc and license dir between subpackages
- Enable EPEL PY3 build
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.5.3-3 * Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.5.3-3
- Update Python 2 dependency declarations to new packaging standards - Update Python 2 dependency declarations to new packaging standards