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