From a923c0d181613629c387ac8113e2f446ca3e99ac Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Thu, 26 Nov 2026 03:54:04 +0000 Subject: automatic import of python-psutil --- psutil.spec | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 psutil.spec (limited to 'psutil.spec') diff --git a/psutil.spec b/psutil.spec new file mode 100644 index 0000000..ad6ad00 --- /dev/null +++ b/psutil.spec @@ -0,0 +1,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 - 7.1.3-1 +- Upgrade to 7.1.3 -- cgit v1.2.3