diff --git a/python-cvss.spec b/python-cvss.spec index b6443bb..25cddc0 100644 --- a/python-cvss.spec +++ b/python-cvss.spec @@ -1,14 +1,16 @@ %global srcname cvss %if 0%{?rhel} && 0%{?rhel} <= 7 +%bcond_without python2 %bcond_with python3 %else +%bcond_with python2 %bcond_without python3 %endif Name: python-%{srcname} Version: 1.9 -Release: 1%{?dist} +Release: 2%{?dist} Summary: CVSS2/3 library with interactive calculator License: LGPLv3+ @@ -23,6 +25,9 @@ interactive calculator. %description %{_description} +# Python 2 Package +# (RHEL Only) +%if %{with python2} %package -n python2-%{srcname} Summary: %{summary} %{?python_provide:%python_provide python2-%{srcname}} @@ -39,7 +44,9 @@ BuildRequires: python2-setuptools %description -n python2-%{srcname} %{_description} Python 2 version. +%endif # with python2 +# Python 3 Package %if %{with python3} %package -n python3-%{srcname} Summary: %{summary} @@ -50,19 +57,23 @@ BuildRequires: python3-setuptools %description -n python3-%{srcname} %{_description} Python 3 version. -%endif +%endif # with python3 %prep %autosetup -n %{srcname}-%{version} %build +%if %{with python2} %py2_build +%endif %if %{with python3} %py3_build %endif %install +%if %{with python2} %py2_install +%endif %if %{with python3} %py3_install %endif @@ -70,11 +81,13 @@ Python 3 version. # Tests are not ran (have to patch code and use nose/pytest) #check +%if %{with python2} %files -n python2-%{srcname} %doc README.rst %license LICENSE %{python2_sitelib}/%{srcname}-*.egg-info/ %{python2_sitelib}/%{srcname}/ +%endif %if %{with python3} %files -n python3-%{srcname} @@ -87,6 +100,11 @@ Python 3 version. %{_bindir}/cvss_calculator %changelog +* Wed Sep 19 2018 Viliam Krizan - 1.9-2 +- Removal of deprecated python2-cvss package for Fedora, + as part of https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + (RHBZ #1628566) + * Mon Aug 06 2018 Viliam Krizan - 1.9-1 - New release 1.9 - The CVSS vector parser from an arbitrary text was added.