1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# topdir: psutil-7.1.3 (打包时 --transform 将源码目录重命名为 psutil-7.1.3)
Name: python-psutil
Version: 7.1.3
Release: 1%{?dist}
Summary: A library for retrieving information on running processes and system utilization in Python
License: BSD-3-Clause
URL: https://github.com/giampaolo/psutil
Source0: https://github.com/giampaolo/psutil/archive/release-%{version}.tar.gz#/psutil-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%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-%{version}
find psutil -name \*.py | while read -r file; do
sed -i.orig -e '1{/^#!/d}' "$file" && \
touch -r "$file.orig" "$file" && \
rm "$file.orig"
done
%build
# C 扩展包:禁用 LTO / hardened build,避免 aarch64 链接异常
%define _lto_cflags %{nil}
%undefine _hardened_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 Nov 26 2026 Python_Bot <Python_Bot@openeuler.org> - 7.1.3-1
- Upgrade to 7.1.3
|