python-psutil/python-psutil.spec
zhang-liang-pengkun 567b51cad4 fix repr(Error): PID was not shown if PID == 0
Signed-off-by: zhang-liang-pengkun <zhangliangpengkun@xfusion.com>
(cherry picked from commit e91c59d7faa590573b0ec0648340d8a6c1a95c89)
(cherry picked from commit 60d09981220e318efe7ea1a0ca0318087b913bac)
2023-11-27 14:21:07 +08:00

66 lines
2.4 KiB
RPMSpec

Name: python-psutil
Version: 5.9.0
Release: 2
Summary: A library for retrieving information on running processes and system utilization in Python
License: BSD
URL: https://github.com/giampaolo/psutil
Source0: https://github.com/giampaolo/psutil/archive/release-%{version}.tar.gz#/psutil-%{version}.tar.gz
Patch0001: 0001-fix-repr-Error-PID-was-not-shown-if-PID-0.patch
BuildRequires: gcc python3-devel procps-ng python3-mock
%description
psutil (process and system utilities) is a cross-platform library for retrieving information
on running processes and system utilization (CPU, memory, disks, network, sensors) in Python.
It is useful mainly for system monitoring, profiling and limiting process resources and
management of running processes.It implements many functionalities offered by classic UNIX
command line tools such as ps, top, iotop, lsof, netstat, ifconfig, free and others.
%package -n python3-psutil
Summary: A library for retrieving information on running processes and system utilization in Python3
%{?python_provide:%python_provide python3-psutil}
%description -n python3-psutil
psutil (process and system utilities) is a cross-platform library for retrieving information
on running processes and system utilization (CPU, memory, disks, network, sensors) in Python3.
It is useful mainly for system monitoring, profiling and limiting process resources and
management of running processes.It implements many functionalities offered by classic UNIX
command line tools such as ps, top, iotop, lsof, netstat, ifconfig, free and others.
%prep
%autosetup -n psutil-release-%{version} -p1
find psutil -name \*.py | while read file; do
sed -i.orig -e '1{/^#!/d}' $file && \
touch -r $file.orig $file && \
rm $file.orig
done
%build
%py3_build
%install
%py3_install
%files -n python3-psutil
%license LICENSE
%doc CREDITS HISTORY.rst README.rst
%{python3_sitearch}/psutil/
%{python3_sitearch}/*.egg-info
%changelog
* Thu Oct 19 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 5.9.0-2
- fix repr(Error): PID was not shown if PID == 0
* Mon Jun 13 2022 OpenStack_SIG <openstack@openeuler.org> - 5.9.0-1
- Update version to 5.9.0
* Thu Jul 15 2021 OpenStack_SIG <openstack@openeuler.org> - 5.8.0-1
- Update version to 5.8.0
* Wed Aug 05 2020 lingsheng <lingsheng@huawei.com> - 5.4.3-8
- Remove python2-psutil subpackage
* Sat Nov 23 2019 zhouyihang <zhouyihang1@huawei.com> - 5.4.3-7
- Package init