Drop Python 2 subpackage for F30+/RHEL8+

This commit is contained in:
Neal Gompa 2018-11-13 10:18:29 -05:00
parent 97d11f5bb9
commit a3635013d6
1 changed files with 22 additions and 1 deletions

View File

@ -7,10 +7,17 @@
%bcond_without python3 %bcond_without python3
%endif %endif
# Do not build Python 2 for Fedora 30+ and RHEL 8+
%if 0%{?fedora} > 29 || 0%{?rhel} >= 8
%bcond_with python2
%else
%bcond_without python2
%endif
Summary: Tools for building live CDs Summary: Tools for building live CDs
Name: livecd-tools Name: livecd-tools
Version: 25.0 Version: 25.0
Release: 11%{?dist} Release: 12%{?dist}
Epoch: 1 Epoch: 1
License: GPLv2 License: GPLv2
Group: System Environment/Base Group: System Environment/Base
@ -27,7 +34,9 @@ Patch2: 0001-DNF-3-workaround-a-bug-with-config-values-that-are-l.patch
# https://github.com/livecd-tools/livecd-tools/pull/108 # https://github.com/livecd-tools/livecd-tools/pull/108
Patch3: 0001-Handle-dnf-config-option-showing-as-tuple-not-list-i.patch Patch3: 0001-Handle-dnf-config-option-showing-as-tuple-not-list-i.patch
%if %{with python2}
BuildRequires: python2-devel BuildRequires: python2-devel
%endif
%if %{with python3} %if %{with python3}
BuildRequires: python3-devel BuildRequires: python3-devel
%endif %endif
@ -81,11 +90,15 @@ Requires: squashfs-tools
Requires: policycoreutils Requires: policycoreutils
Requires: selinux-policy-targeted Requires: selinux-policy-targeted
Requires: dracut >= 045 Requires: dracut >= 045
%if %{with python2}
Obsoletes: python2-imgcreate < 1:25.0-12
%endif
%description -n python-imgcreate-sysdeps %description -n python-imgcreate-sysdeps
This package describes the common system dependencies for This package describes the common system dependencies for
python-imgcreate. python-imgcreate.
%if %{with python2}
%package -n python2-imgcreate %package -n python2-imgcreate
Summary: Python 2 modules for building system images Summary: Python 2 modules for building system images
Group: System Environment/Base Group: System Environment/Base
@ -101,6 +114,7 @@ Requires: python2-dbus
%description -n python2-imgcreate %description -n python2-imgcreate
Python 2 modules that can be used for building images for things Python 2 modules that can be used for building images for things
like live image or appliances. like live image or appliances.
%endif
%if %{with python3} %if %{with python3}
%package -n python3-imgcreate %package -n python3-imgcreate
@ -142,8 +156,10 @@ Tools for installing Live CD ISOs to different mediums
# Nothing to do # Nothing to do
%install %install
%if %{with python2}
# Install Python 2 stuff # Install Python 2 stuff
%make_install PYTHON=python2 %make_install PYTHON=python2
%endif
%if %{with python3} %if %{with python3}
# Install Python 3 stuff # Install Python 3 stuff
@ -176,10 +192,12 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%files -n python-imgcreate-sysdeps %files -n python-imgcreate-sysdeps
# No files because empty metapackage # No files because empty metapackage
%if %{with python2}
%files -n python2-imgcreate %files -n python2-imgcreate
%license COPYING %license COPYING
%doc API %doc API
%{python2_sitelib}/imgcreate %{python2_sitelib}/imgcreate
%endif
%if %{with python3} %if %{with python3}
%files -n python3-imgcreate %files -n python3-imgcreate
@ -197,6 +215,9 @@ rm -rfv %{buildroot}%{_mandir}/man8/livecd-iso-to-*
%endif %endif
%changelog %changelog
* Tue Nov 13 2018 Neal Gompa <ngompa13@gmail.com> - 1:25.0-12
- Drop Python 2 subpackage for F30+/RHEL8+
* Wed Sep 26 2018 Adam Williamson <awilliam@redhat.com> - 1:25.0-11 * Wed Sep 26 2018 Adam Williamson <awilliam@redhat.com> - 1:25.0-11
- Backport further fix for #1595917 - Backport further fix for #1595917