diff --git a/python-psutil.spec b/python-psutil.spec index a3e6753..df5deb4 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -3,7 +3,7 @@ Name: python-%{srcname} Version: 5.8.0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: %{sum} License: BSD @@ -21,15 +21,11 @@ Patch2: python-psutil-add-delta-to-cputest.patch BuildRequires: gcc BuildRequires: grep BuildRequires: make -BuildRequires: python%{python3_pkgversion}-devel +# 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}-setuptools # Test dependencies BuildRequires: procps-ng -BuildRequires: python%{python3_pkgversion}-setuptools - -# 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 %description psutil is a module providing an interface for retrieving information on all @@ -41,6 +37,12 @@ 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 @@ -51,8 +53,17 @@ 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 @@ -62,6 +73,12 @@ 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 python%{python3_pkgversion}-psutil-tests +Summary: %{sum}, test suite +Requires: python%{python3_pkgversion}-psutil%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n python%{python3_pkgversion}-psutil-tests +The test suite for psutil. %prep %autosetup -p1 -n %{srcname}-release-%{version} @@ -115,16 +132,26 @@ test -f %{buildroot}%{python2_egg_path} %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}/ +%exclude %{python3_sitearch}/%{srcname}/tests + +%files -n python%{python3_pkgversion}-%{srcname}-tests +%{python3_sitearch}/%{srcname}/tests/ %changelog +* Wed Aug 18 2021 Charalampos Stratakis - 5.8.0-11 +- Separate the tests to their own subpackage + * Sat Aug 07 2021 Kevin Fenzi - 5.8.0-10 - Add patch to add delta for cpu tests.