From af3e1aa4bf3b6dd72fcd8fcc45a5b95088d3e97b Mon Sep 17 00:00:00 2001 From: Carl George Date: Sun, 4 Nov 2018 15:27:27 -0600 Subject: [PATCH] Disable python2 subpackage on F30+ --- python-jwt.spec | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/python-jwt.spec b/python-jwt.spec index 1bed479..c3bc89f 100644 --- a/python-jwt.spec +++ b/python-jwt.spec @@ -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\ encrypted JSON objects. +%if %{defined fedora} && 0%{?fedora} < 30 +%bcond_without python2 +%endif +%bcond_without python3 + Name: python-%{pkgname} Version: 1.6.4 -Release: 1%{?dist} +Release: 2%{?dist} Summary: JSON Web Token implementation in Python License: MIT URL: https://github.com/jpadilla/pyjwt @@ -30,6 +35,7 @@ BuildArch: noarch %description %{_description} +%if %{with python2} %package -n python2-%{pkgname} Summary: %{summary} BuildRequires: python2-devel @@ -41,8 +47,10 @@ Requires: python2-cryptography >= 1.4.0 %description -n python2-%{pkgname} %{_description} +%endif +%if %{with python3} %package -n python%{python3_pkgversion}-%{pkgname} Summary: %{summary} BuildRequires: python%{python3_pkgversion}-devel @@ -54,6 +62,7 @@ Requires: python%{python3_pkgversion}-cryptography >= 1.4.0 %description -n python%{python3_pkgversion}-%{pkgname} %{_description} +%endif %prep @@ -63,36 +72,43 @@ rm setup.cfg %build -%py2_build -%py3_build +%{?with_python2:%py2_build} +%{?with_python3:%py3_build} %install -%py2_install -%py3_install +%{?with_python2:%py2_install} +%{?with_python3:%py3_install} %check -py.test-%{python2_version} --verbose -py.test-%{python3_version} --verbose +%{?with_python2:PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} --verbose tests} +%{?with_python3:PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} --verbose tests} +%if %{with python2} %files -n python2-%{pkgname} %doc README.rst AUTHORS %license LICENSE %{python2_sitelib}/%{libname} %{python2_sitelib}/%{eggname}-%{version}-py%{python2_version}.egg-info +%endif +%if %{with python3} %files -n python%{python3_pkgversion}-%{pkgname} %doc README.rst AUTHORS %license LICENSE %{python3_sitelib}/%{libname} %{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info %{_bindir}/pyjwt +%endif %changelog +* Sun Nov 04 2018 Carl George - 1.6.4-2 +- Disable python2 subpackage on F30+ + * Wed Jul 25 2018 Pierre-Yves Chibon - 1.6.4-1 - Update to 1.6.4