|
|
|
@ -1,51 +1,64 @@
|
|
|
|
|
%global with_python3 1
|
|
|
|
|
%global short_name psutil
|
|
|
|
|
%global srcname psutil
|
|
|
|
|
|
|
|
|
|
# Filter Python modules from Provides
|
|
|
|
|
%{?filter_setup:
|
|
|
|
|
%filter_provides_in %{python_sitearch}/.*\.so$
|
|
|
|
|
%filter_setup
|
|
|
|
|
}
|
|
|
|
|
%global _desc \
|
|
|
|
|
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, 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.
|
|
|
|
|
|
|
|
|
|
%global _sum A process and system utilities module for Python
|
|
|
|
|
|
|
|
|
|
Name: python-psutil
|
|
|
|
|
Version: 0.6.1
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: A process and system utilities module for Python
|
|
|
|
|
Version: 5.6.7
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: %{_sum}
|
|
|
|
|
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: http://psutil.googlecode.com/
|
|
|
|
|
Source0: http://psutil.googlecode.com/files/%{short_name}-%{version}.tar.gz
|
|
|
|
|
URL: https://github.com/giampaolo/psutil
|
|
|
|
|
Source0: https://github.com/giampaolo/psutil/archive/release-%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
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, 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.
|
|
|
|
|
%{_desc}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python3-psutil
|
|
|
|
|
Summary: A process and system utilities module for Python 3
|
|
|
|
|
%package -n python2-psutil
|
|
|
|
|
Summary: %{_sum}
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
%{?python_provide:%python_provide python2-psutil}
|
|
|
|
|
|
|
|
|
|
%description -n python3-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.
|
|
|
|
|
%description -n python2-psutil
|
|
|
|
|
%{_desc}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-psutil
|
|
|
|
|
Summary: %{_sum}
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-psutil}
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-psutil
|
|
|
|
|
%{_desc}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?python3_other_pkgversion}
|
|
|
|
|
%package -n python%{python3_other_pkgversion}-psutil
|
|
|
|
|
Summary: %{_sum}
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_other_pkgversion}-psutil}
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_other_pkgversion}-devel
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_other_pkgversion}-psutil
|
|
|
|
|
%{_desc}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{short_name}-%{version}
|
|
|
|
|
%autosetup -p1 -n %{srcname}-release-%{version}
|
|
|
|
|
|
|
|
|
|
# Remove shebangs
|
|
|
|
|
for file in psutil/*.py; do
|
|
|
|
@ -54,59 +67,78 @@ for file in psutil/*.py; do
|
|
|
|
|
rm $file.orig
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
CFLAGS=$RPM_OPT_FLAGS %{__python} setup.py build
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
CFLAGS=$RPM_OPT_FLAGS %{__python3} setup.py build
|
|
|
|
|
popd
|
|
|
|
|
%py2_build
|
|
|
|
|
%py3_build
|
|
|
|
|
%if 0%{?python3_other_pkgversion}
|
|
|
|
|
%py3_other_build
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%{__python} setup.py install \
|
|
|
|
|
--skip-build \
|
|
|
|
|
--root $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
# Fix permissions
|
|
|
|
|
chmod 0755 $RPM_BUILD_ROOT%{python_sitearch}/*.so
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py install \
|
|
|
|
|
--skip-build \
|
|
|
|
|
--root $RPM_BUILD_ROOT
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
# Fix permissions
|
|
|
|
|
chmod 0755 $RPM_BUILD_ROOT%{python3_sitearch}/*.so
|
|
|
|
|
%py2_install
|
|
|
|
|
%py3_install
|
|
|
|
|
%if 0%{?python3_other_pkgversion}
|
|
|
|
|
%py3_other_install
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc CREDITS HISTORY LICENSE README
|
|
|
|
|
%{python_sitearch}/%{short_name}/
|
|
|
|
|
%{python_sitearch}/*.egg-info
|
|
|
|
|
%{python_sitearch}/*.so
|
|
|
|
|
|
|
|
|
|
%files -n python2-psutil
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CREDITS HISTORY.rst README.rst
|
|
|
|
|
%{python2_sitearch}/%{srcname}/
|
|
|
|
|
%{python2_sitearch}/*.egg-info
|
|
|
|
|
%{python2_sitearch}/%{srcname}/*.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%files -n python3-psutil
|
|
|
|
|
%doc CREDITS HISTORY LICENSE README
|
|
|
|
|
%{python3_sitearch}/%{short_name}/
|
|
|
|
|
%files -n python%{python3_pkgversion}-psutil
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CREDITS HISTORY.rst README.rst
|
|
|
|
|
%{python3_sitearch}/%{srcname}/
|
|
|
|
|
%{python3_sitearch}/*.egg-info
|
|
|
|
|
%{python3_sitearch}/*.so
|
|
|
|
|
%{python3_sitearch}/%{srcname}/*.so
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?python3_other_pkgversion}
|
|
|
|
|
%files -n python%{python3_other_pkgversion}-psutil
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc CREDITS HISTORY.rst README.rst
|
|
|
|
|
%{python3_other_sitearch}/%{srcname}/
|
|
|
|
|
%{python3_other_sitearch}/*.egg-info
|
|
|
|
|
%{python3_other_sitearch}/%{srcname}/*.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sun Feb 16 2020 Kevin Fenzi <kevin@scrye.com> - 5.6.7-1
|
|
|
|
|
- Update to 5.6.7. Fixes CVE-2019-18874
|
|
|
|
|
|
|
|
|
|
* Sat May 04 2019 Kevin Fenzi <kevin@scrye.com> - 2.2.1-6
|
|
|
|
|
- Clean up spec and source/upstream.
|
|
|
|
|
|
|
|
|
|
* Fri Mar 08 2019 Troy Dawson <tdawson@redhat.com> - 2.2.1-5
|
|
|
|
|
- Rebuilt to change main python from 3.4 to 3.6
|
|
|
|
|
|
|
|
|
|
* Mon Nov 12 2018 Orion Poplawski <orion@nwra.com> - 2.2.1-4
|
|
|
|
|
- Build for python36
|
|
|
|
|
|
|
|
|
|
* Thu Nov 16 2017 Björn Esser <besser82@fedoraproject.org> - 2.2.1-3
|
|
|
|
|
- Use proper Python3 macros
|
|
|
|
|
|
|
|
|
|
* Thu Aug 31 2017 Björn Esser <besser82@fedoraproject.org> - 2.2.1-2
|
|
|
|
|
- Build a package for Python34
|
|
|
|
|
|
|
|
|
|
* Wed Dec 09 2015 Ralph Bean <rbean@redhat.com> - 2.2.1-1
|
|
|
|
|
- Update to 2.2.1 for https://bugzilla.redhat.com/1288221
|
|
|
|
|
- Update names of %%doc files.
|
|
|
|
|
|
|
|
|
|
* Wed Mar 11 2015 Alan Pevec <apevec@redhat.com> - 1.2.1-1
|
|
|
|
|
- Update to 1.2.1
|
|
|
|
|
|
|
|
|
|
* Tue Feb 18 2014 Matthias Runge <mrunge@redhat.com> - 0.6.1-3
|
|
|
|
|
- epel doesn't have python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|