Disable Py2 subpackage on F>=31
This commit is contained in:
parent
21d0ecea2d
commit
2721f1d57d
@ -1,10 +1,15 @@
|
||||
%if 0%{?fedora} >= 31
|
||||
%bcond_with python2
|
||||
%else
|
||||
%bcond_without python2
|
||||
%endif
|
||||
%bcond_without python3
|
||||
|
||||
%global srcname productmd
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 1.20
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library providing parsers for metadata related to OS installation
|
||||
|
||||
License: LGPLv2+
|
||||
@ -19,6 +24,7 @@ and installation media.
|
||||
|
||||
%description %_description
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%package -n python2-%{srcname}
|
||||
Summary: %summary
|
||||
Obsoletes: productmd <= %{version}-%{release}
|
||||
@ -36,6 +42,7 @@ Requires: python2-six
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
|
||||
%description -n python2-%{srcname} %_description
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python%{python3_pkgversion}-%{srcname}
|
||||
@ -52,31 +59,39 @@ Requires: python%{python3_pkgversion}-six
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
|
||||
%build
|
||||
%if 0%{?with_python2}
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if 0%{?with_python2}
|
||||
%py2_install
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if 0%{?with_python2}
|
||||
%{__python2} ./setup.py test
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%{__python3} ./setup.py test
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python2}
|
||||
%files -n python2-%{srcname}
|
||||
%license LICENSE
|
||||
%doc AUTHORS
|
||||
%{python2_sitelib}/productmd/
|
||||
%{python2_sitelib}/productmd-%{version}-py?.?.egg-info
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
@ -87,6 +102,9 @@ Requires: python%{python3_pkgversion}-six
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Mar 07 2019 Lubomír Sedlář <lsedlar@redhat.com> - 1.20-2
|
||||
- Disable python 2 subpackage on F>=31
|
||||
|
||||
* Tue Mar 05 2019 Lubomír Sedlář <lsedlar@redhat.com> - 1.20-1
|
||||
- Improve getting sync between image types and formats
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user