Disable legacy and python2 subpackage

Yum has been removed.
This commit is contained in:
Lubomír Sedlář 2019-02-27 07:51:50 +01:00
parent bb911b7c9e
commit f7a5b86fb4

View File

@ -2,7 +2,7 @@
Name: pungi Name: pungi
Version: 4.1.33 Version: 4.1.33
Release: 3%{?dist} Release: 4%{?dist}
Summary: Distribution compose tool Summary: Distribution compose tool
License: GPLv2 License: GPLv2
@ -14,7 +14,9 @@ Patch2: 0001-image-build-Fix-typo-in-file-extension-for-vmdk-imag.patch
BuildRequires: python3-nose BuildRequires: python3-nose
BuildRequires: python3-mock BuildRequires: python3-mock
%if 0%{?fedora} < 31
BuildRequires: python2-devel BuildRequires: python2-devel
%endif
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-setuptools BuildRequires: python3-setuptools
BuildRequires: python3-productmd >= 1.17 BuildRequires: python3-productmd >= 1.17
@ -95,6 +97,7 @@ for creating unified ISO images, validating config file or sending progress
notification to Fedora Message Bus. notification to Fedora Message Bus.
%if 0%{?fedora} < 31
%package legacy %package legacy
Summary: Legacy pungi executable Summary: Legacy pungi executable
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -124,7 +127,7 @@ Summary: Python 2 libraries for pungi
%description -n python2-%{name} %description -n python2-%{name}
Python library with code for Pungi. This is not a public library and there are Python library with code for Pungi. This is not a public library and there are
no guarantees about API stability. no guarantees about API stability.
%endif
%package -n python3-%{name} %package -n python3-%{name}
Summary: Python 3 libraries for pungi Summary: Python 3 libraries for pungi
@ -138,7 +141,9 @@ no guarantees about API stability.
%autosetup -p1 %autosetup -p1
%build %build
%if 0%{?fedora} < 31
%py2_build %py2_build
%endif
%py3_build %py3_build
cd doc cd doc
make latexpdf SPHINXBUILD=/usr/bin/sphinx-build-3 make latexpdf SPHINXBUILD=/usr/bin/sphinx-build-3
@ -148,17 +153,25 @@ make man SPHINXBUILD=/usr/bin/sphinx-build-3
gzip _build/man/pungi.1 gzip _build/man/pungi.1
%install %install
%if 0%{?fedora} < 31
%py2_install %py2_install
mv %{buildroot}%{_bindir}/pungi %{buildroot}%{_bindir}/pungi-2 mv %{buildroot}%{_bindir}/pungi %{buildroot}%{_bindir}/pungi-2
%endif
%py3_install %py3_install
%if 0%{?fedora} < 31
mv %{buildroot}%{_bindir}/pungi-2 %{buildroot}%{_bindir}/pungi mv %{buildroot}%{_bindir}/pungi-2 %{buildroot}%{_bindir}/pungi
%endif
%{__install} -d %{buildroot}/var/cache/pungi %{__install} -d %{buildroot}/var/cache/pungi
%{__install} -d %{buildroot}%{_mandir}/man1 %{__install} -d %{buildroot}%{_mandir}/man1
%{__install} -m 0644 doc/_build/man/pungi.1.gz %{buildroot}%{_mandir}/man1 %{__install} -m 0644 doc/_build/man/pungi.1.gz %{buildroot}%{_mandir}/man1
# No utils package for Python 2 # No utils package for Python 2. On Py 3 this is not installed at all
rm -rf %{buildroot}%{python2_sitelib}/%{name}_utils rm -rf %{buildroot}%{python2_sitelib}/%{name}_utils
%if 0%{?fedora} > 30
rm %{buildroot}%{_bindir}/pungi
%endif
%check %check
nosetests-3 --exe nosetests-3 --exe
@ -174,17 +187,19 @@ nosetests-3 --exe
%{_datadir}/pungi %{_datadir}/pungi
/var/cache/pungi /var/cache/pungi
%if 0%{?fedora} < 31
%files legacy
%{_bindir}/%{name}
%files -n python2-%{name} %files -n python2-%{name}
%{python2_sitelib}/%{name} %{python2_sitelib}/%{name}
%{python2_sitelib}/%{name}-%{version}-py?.?.egg-info %{python2_sitelib}/%{name}-%{version}-py?.?.egg-info
%endif
%files -n python3-%{name} %files -n python3-%{name}
%{python3_sitelib}/%{name} %{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}-py?.?.egg-info %{python3_sitelib}/%{name}-%{version}-py?.?.egg-info
%files legacy
%{_bindir}/%{name}
%files utils %files utils
%{python3_sitelib}/%{name}_utils %{python3_sitelib}/%{name}_utils
%{_bindir}/%{name}-create-unified-isos %{_bindir}/%{name}-create-unified-isos
@ -197,6 +212,9 @@ nosetests-3 --exe
%{_bindir}/%{name}-wait-for-signed-ostree-handler %{_bindir}/%{name}-wait-for-signed-ostree-handler
%changelog %changelog
* Wed Feb 27 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.33-4
- Disable legacy and python 2 packages on Fedora 31+
* Mon Feb 25 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.33-3 * Mon Feb 25 2019 Lubomír Sedlář <lsedlar@redhat.com> - 4.1.33-3
- Fix copying vmdk images from koji tasks - Fix copying vmdk images from koji tasks