Subpackage python2-rrdtool has been removed

This commit is contained in:
Miro Hrončok 2019-08-30 11:31:54 +02:00
parent 697274a0e1
commit 6e7bdeb9eb

View File

@ -1,9 +1,3 @@
%if 0%{?rhel} > 7
%global with_python2 %{?_without_python2: 0} %{?!_without_python2: 0}
%else
%global with_python2 %{?_without_python2: 0} %{?!_without_python2: 1}
%endif
%global with_python3 %{?_without_python3: 0} %{?!_without_python3: 1}
%global with_php %{?_without_php: 0} %{?!_without_php: 0}
%global with_tcl %{?_without_tcl: 0} %{?!_without_tcl: 1}
@ -24,7 +18,7 @@
Summary: Round Robin Database Tool to store and display time-series data
Name: rrdtool
Version: 1.7.2
Release: 4%{?dist}
Release: 5%{?dist}
License: GPLv2+ with exceptions
URL: http://oss.oetiker.ch/rrdtool/
Source0: http://oss.oetiker.ch/%{name}/pub/%{name}-%{version}.tar.gz
@ -88,29 +82,7 @@ Provides: perl-%{name} = %{version}-%{release}
%description perl
The Perl RRDtool bindings
%if %{with_python2}
# Make sure the runtime python is newer than the build one;
# give a default value to handle parsing in cases when python is not present:
%{!?rrd_python_version: %global rrd_python_version %(%{__python2} -c 'import sys; print sys.version.split(" ")[0]' || echo "3.14")}
%package -n python2-rrdtool
%{?python_provide:%python_provide python2-rrdtool}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
Summary: Python RRDtool bindings
BuildRequires: python2-devel, python2-setuptools
Requires: python2 >= %{rrd_python_version}
Requires: %{name} = %{version}-%{release}
Obsoletes: python-%{name} < %{version}-%{release}
Provides: python-%{name} = %{version}-%{release}
%description -n python2-rrdtool
Python RRDtool bindings.
%endif
%if %{with_python3}
%package -n python3-rrdtool
%{?python_provide:%python_provide python3-rrdtool}
Summary: Python RRDtool bindings
@ -120,7 +92,6 @@ Requires: %{name} = %{version}-%{release}
%description -n python3-rrdtool
Python RRDtool bindings.
%endif
%if %{with_php}
%package php
@ -223,7 +194,7 @@ cp -p /usr/lib/rpm/config.{guess,sub} php4/
%else
--disable-tcl \
%endif
%if %{with_python2} || %{with_python3}
%if %{with_python3}
--enable-python \
%else
--disable-python \
@ -268,12 +239,7 @@ make
make install DESTDIR="%{rrdtmp}"
pushd php4/
%if %{with_python2}
export PYTHON=%{__python2}
%endif
%if %{with_python3}
export PYTHON=%{__python3}
%endif
%configure \
--with-rrdtool="%{rrdtmp}%{_prefix}" \
@ -292,21 +258,11 @@ find examples/ -name "*.pl" \
# Rebuild python
pushd bindings/python
%if %{with_python2}
%py2_build
%endif
%if %{with_python3}
%py3_build
%endif
popd
%install
%if %{with_python2}
export PYTHON=%{__python2}
%endif
%if %{with_python3}
export PYTHON=%{__python3}
%endif
make DESTDIR="$RPM_BUILD_ROOT" PYTHON="$PYTHON" install
# Install the php module
@ -346,12 +302,7 @@ find examples/ -type f -exec chmod 0644 {} \;
# Reinstall python
pushd bindings/python
%if %{with_python2}
%py2_install
%endif
%if %{with_python3}
%py3_install
%endif
popd
# Clean up the buildroot
@ -410,19 +361,11 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
%{perl_vendorarch}/*.pm
%attr(0755,root,root) %{perl_vendorarch}/auto/RRDs/
%if %{with_python2}
%files -n python2-rrdtool
%doc bindings/python/COPYING bindings/python/README.md
%{python2_sitearch}/rrdtool.so
%{python2_sitearch}/rrdtool-*.egg-info
%endif
%if %{with_python3}
%files -n python3-rrdtool
%doc bindings/python/COPYING bindings/python/README.md
%{python3_sitearch}/rrdtool*.so
%{python3_sitearch}/rrdtool-*.egg-info
%endif
%if %{with_php}
%files php
@ -452,6 +395,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \
%endif
%changelog
* Fri Aug 30 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.2-5
- Subpackage python2-rrdtool has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.7.2-4
- Rebuilt for Python 3.8