Disable python2 subpackage on F30+

This commit is contained in:
Carl George 2018-11-04 15:27:27 -06:00
parent d979347857
commit af3e1aa4bf

View File

@ -15,10 +15,15 @@ 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 %{defined fedora} && 0%{?fedora} < 30
%bcond_without python2
%endif
%bcond_without python3
Name: python-%{pkgname} Name: python-%{pkgname}
Version: 1.6.4 Version: 1.6.4
Release: 1%{?dist} Release: 2%{?dist}
Summary: JSON Web Token implementation in Python Summary: JSON Web Token implementation in Python
License: MIT License: MIT
URL: https://github.com/jpadilla/pyjwt URL: https://github.com/jpadilla/pyjwt
@ -30,6 +35,7 @@ BuildArch: noarch
%description %{_description} %description %{_description}
%if %{with python2}
%package -n python2-%{pkgname} %package -n python2-%{pkgname}
Summary: %{summary} Summary: %{summary}
BuildRequires: python2-devel BuildRequires: python2-devel
@ -41,8 +47,10 @@ Requires: python2-cryptography >= 1.4.0
%description -n python2-%{pkgname} %{_description} %description -n python2-%{pkgname} %{_description}
%endif
%if %{with python3}
%package -n python%{python3_pkgversion}-%{pkgname} %package -n python%{python3_pkgversion}-%{pkgname}
Summary: %{summary} Summary: %{summary}
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
@ -54,6 +62,7 @@ Requires: python%{python3_pkgversion}-cryptography >= 1.4.0
%description -n python%{python3_pkgversion}-%{pkgname} %{_description} %description -n python%{python3_pkgversion}-%{pkgname} %{_description}
%endif
%prep %prep
@ -63,36 +72,43 @@ rm setup.cfg
%build %build
%py2_build %{?with_python2:%py2_build}
%py3_build %{?with_python3:%py3_build}
%install %install
%py2_install %{?with_python2:%py2_install}
%py3_install %{?with_python3:%py3_install}
%check %check
py.test-%{python2_version} --verbose %{?with_python2:PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} --verbose tests}
py.test-%{python3_version} --verbose %{?with_python3:PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose tests}
%if %{with python2}
%files -n python2-%{pkgname} %files -n python2-%{pkgname}
%doc README.rst AUTHORS %doc README.rst AUTHORS
%license LICENSE %license LICENSE
%{python2_sitelib}/%{libname} %{python2_sitelib}/%{libname}
%{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info
%endif
%if %{with python3}
%files -n python%{python3_pkgversion}-%{pkgname} %files -n python%{python3_pkgversion}-%{pkgname}
%doc README.rst AUTHORS %doc README.rst AUTHORS
%license LICENSE %license LICENSE
%{python3_sitelib}/%{libname} %{python3_sitelib}/%{libname}
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
%{_bindir}/pyjwt %{_bindir}/pyjwt
%endif
%changelog %changelog
* Sun Nov 04 2018 Carl George <carl@george.computer> - 1.6.4-2
- Disable python2 subpackage on F30+
* Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.6.4-1 * Wed Jul 25 2018 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.6.4-1
- Update to 1.6.4 - Update to 1.6.4