Drop python2-psutil, as it is no longer needed
This commit is contained in:
parent
523a918663
commit
024746ce9a
@ -3,7 +3,7 @@
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 5.8.0
|
||||
Release: 11%{?dist}
|
||||
Release: 12%{?dist}
|
||||
Summary: %{sum}
|
||||
|
||||
License: BSD
|
||||
@ -20,8 +20,7 @@ Patch1: https://github.com/giampaolo/psutil/pull/1935.patch#/python-psut
|
||||
BuildRequires: gcc
|
||||
BuildRequires: grep
|
||||
BuildRequires: make
|
||||
# python3-setuptools is required by both the python2 and python3 versions
|
||||
# of the package as to create the PKG-INFO directory.
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
# Test dependencies
|
||||
BuildRequires: procps-ng
|
||||
@ -34,36 +33,9 @@ command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
|
||||
ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
|
||||
|
||||
|
||||
%package -n python2-%{srcname}
|
||||
Summary: %{sum}
|
||||
|
||||
# This package has an exception to use Python 2 in Fedora 32+
|
||||
# The exception is for chromium (chrome-remote-desktop)
|
||||
# https://pagure.io/fesco/issue/2214
|
||||
BuildRequires: python2.7
|
||||
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
Obsoletes: python-%{srcname} < 3.1.1-3
|
||||
|
||||
%description -n python2-psutil
|
||||
psutil is a module providing an interface for retrieving information on all
|
||||
running processes and system utilization (CPU, memory, disks, network, users) in
|
||||
a portable way by using Python 3, implementing many functionalities offered by
|
||||
command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
|
||||
ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
|
||||
|
||||
%package -n python2-psutil-tests
|
||||
Summary: %{sum}, test suite
|
||||
Requires: python2-psutil%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
%description -n python2-psutil-tests
|
||||
The test suite for psutil.
|
||||
|
||||
%package -n python%{python3_pkgversion}-psutil
|
||||
Summary: %{sum}
|
||||
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
|
||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
||||
|
||||
%description -n python%{python3_pkgversion}-psutil
|
||||
psutil is a module providing an interface for retrieving information on all
|
||||
@ -91,56 +63,22 @@ done
|
||||
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
# %%python2_egg_path was a directory in previous builds, because setuptools were used.
|
||||
# Before the version is bumped and this path changed, we need to preserve the directory to avoid:
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Directory_Replacement/
|
||||
%global python2_egg_path %{python2_sitearch}/%{srcname}-%{version}-py%{python2_version}.egg-info
|
||||
%global python3_egg_path %{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info
|
||||
|
||||
%if "%{version}" == "5.8.0"
|
||||
rm %{buildroot}%{python2_egg_path}
|
||||
cp -a %{buildroot}%{python3_egg_path} %{buildroot}%{python2_egg_path}
|
||||
# if this grep fails, we have a new metadata version and we need to manually check if Python 2 can still understand it
|
||||
grep '^Metadata-Version: 2\.1$' %{buildroot}%{python2_egg_path}/PKG-INFO
|
||||
%endif
|
||||
|
||||
|
||||
%check
|
||||
make test CI_TESTING=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sitearch}
|
||||
|
||||
%if "%{version}" == "5.8.0"
|
||||
# assert the Python 2 egg info is a directory to preserve upgrade path
|
||||
test -d %{buildroot}%{python2_egg_path}
|
||||
%else
|
||||
# assert the Python 2 egg info is *not* a directory to be able to eventually
|
||||
# drop all the egg-info directory mangling from this spec
|
||||
test -f %{buildroot}%{python2_egg_path}
|
||||
%endif
|
||||
|
||||
|
||||
%files -n python2-%{srcname}
|
||||
%license LICENSE
|
||||
%doc CREDITS HISTORY.rst README.rst
|
||||
%{python2_sitearch}/%{srcname}/
|
||||
%{python2_egg_path}
|
||||
%exclude %{python2_sitearch}/%{srcname}/tests
|
||||
|
||||
%files -n python2-%{srcname}-tests
|
||||
%{python2_sitearch}/%{srcname}/tests/
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{srcname}
|
||||
%license LICENSE
|
||||
%doc CREDITS HISTORY.rst README.rst
|
||||
%{python3_sitearch}/%{srcname}/
|
||||
%{python3_egg_path}/
|
||||
%{python3_sitearch}/%{srcname}-%{version}-py%{python3_version}.egg-info/
|
||||
%exclude %{python3_sitearch}/%{srcname}/tests
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{srcname}-tests
|
||||
@ -148,6 +86,9 @@ test -f %{buildroot}%{python2_egg_path}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Sep 08 2021 Miro Hrončok <mhroncok@redhat.com> - 5.8.0-12
|
||||
- Drop python2-psutil, as it is no longer needed
|
||||
|
||||
* Wed Aug 18 2021 Charalampos Stratakis <cstratak@redhat.com> - 5.8.0-11
|
||||
- Separate the tests to their own subpackage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user