forked from pool/python-psutil
- Update to 7.1.2
* 2657_: stop publishing prebuilt Linux and Windows wheels for 32-bit Python.
32-bit CPython is still supported, but psutil must now be built from source.
* 2565_: produce wheels for free-thread cPython 3.13 and 3.14 (patch by
Lysandros Nikolaou)
* 2650_, [macOS]: `Process.cmdline()`_ and `Process.environ()`_ may incorrectly
raise `NoSuchProcess`_ instead of `ZombieProcess`_.
* 2658_, [macOS]: double ``free()`` in `Process.environ()`_ when it fails
internally. This posed a risk of segfault.
* 2662_, [macOS]: massive C code cleanup to guard against possible segfaults
which were (not so) sporadically spotted on CI.
* 2657_: stop publishing prebuilt Linux and Windows wheels for 32-bit Python.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=186
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
||||
34
mem-used-bsc1181475.patch
Normal file
34
mem-used-bsc1181475.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
psutil/_pslinux.py | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: psutil-5.9.5/psutil/_pslinux.py
|
||||
===================================================================
|
||||
--- psutil-5.9.5.orig/psutil/_pslinux.py
|
||||
+++ psutil-5.9.5/psutil/_pslinux.py
|
||||
@@ -474,12 +474,6 @@ def virtual_memory():
|
||||
except KeyError:
|
||||
slab = 0
|
||||
|
||||
- used = total - free - cached - buffers
|
||||
- if used < 0:
|
||||
- # May be symptomatic of running within a LCX container where such
|
||||
- # values will be dramatically distorted over those of the host.
|
||||
- used = total - free
|
||||
-
|
||||
# - starting from 4.4.0 we match free's "available" column.
|
||||
# Before 4.4.0 we calculated it as (free + buffers + cached)
|
||||
# which matched htop.
|
||||
@@ -510,6 +504,12 @@ def virtual_memory():
|
||||
# 24fd2605c51fccc375ab0287cec33aa767f06718/proc/sysinfo.c#L764
|
||||
avail = free
|
||||
|
||||
+ used = total - avail
|
||||
+ if used < 0:
|
||||
+ # May be symptomatic of running within a LCX container where such
|
||||
+ # values will be dramatically distorted over those of the host.
|
||||
+ used = total - free
|
||||
+
|
||||
percent = usage_percent((total - avail), total, round_=1)
|
||||
|
||||
# Warn about missing metrics which are set to 0.
|
||||
BIN
psutil-7.0.0.tar.gz
(Stored with Git LFS)
Normal file
BIN
psutil-7.0.0.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
psutil-7.1.0.tar.gz
Normal file
3
psutil-7.1.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2
|
||||
size 497660
|
||||
3
psutil-7.1.1.tar.gz
Normal file
3
psutil-7.1.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:092b6350145007389c1cfe5716050f02030a05219d90057ea867d18fe8d372fc
|
||||
size 487067
|
||||
3
psutil-7.1.2.tar.gz
Normal file
3
psutil-7.1.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aa225cdde1335ff9684708ee8c72650f6598d5ed2114b9a7c5802030b1785018
|
||||
size 487424
|
||||
1821
python-psutil.changes
Normal file
1821
python-psutil.changes
Normal file
File diff suppressed because it is too large
Load Diff
114
python-psutil.spec
Normal file
114
python-psutil.spec
Normal file
@@ -0,0 +1,114 @@
|
||||
#
|
||||
# spec file for package python-psutil
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%ifarch x86_64 %{ix86}
|
||||
%define psuffix -%{flavor}
|
||||
%bcond_without test
|
||||
%else
|
||||
ExclusiveArch: donotbuild
|
||||
%endif
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-psutil%{psuffix}
|
||||
Version: 7.1.2
|
||||
Release: 0
|
||||
Summary: A process utilities module for Python
|
||||
License: BSD-3-Clause
|
||||
URL: https://github.com/giampaolo/psutil
|
||||
Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: procps
|
||||
BuildRequires: pkgconfig(libsystemd)
|
||||
%if %{with test}
|
||||
%if 0%{?suse_version} > 1500
|
||||
BuildRequires: /usr/bin/who
|
||||
%endif
|
||||
BuildRequires: %{python_module psutil = %{version}}
|
||||
BuildRequires: %{python_module pytest-subtests}
|
||||
BuildRequires: %{python_module pytest-xdist}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: net-tools
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
A graphical interface that lets you easily analyze and introspect unaltered running Python processes.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n psutil-%{version}
|
||||
# do not require pytest-instafail
|
||||
sed -i '/instafail/d' pyproject.toml
|
||||
|
||||
%build
|
||||
%if !%{with test}
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%pyproject_install
|
||||
|
||||
%{python_expand mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-psutil
|
||||
cp -r scripts %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
||||
find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python.*|#!%{__$python}|" {} \;
|
||||
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
||||
%fdupes %{buildroot}%{$python_sitearch}
|
||||
}
|
||||
%endif
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
export PSUTIL_TESTING=1
|
||||
export PSUTIL_DEBUG=1
|
||||
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
# needs to be built with extensions to run scripts
|
||||
%python_expand PYTHON=$python make build
|
||||
# test_who, test_users - need running session
|
||||
SKIPTEST="(test_who and Scripts) or (test_users and TestMiscAPIs)"
|
||||
# test_import_all - pulls in too many dependencies
|
||||
SKIPTEST="$SKIPTEST or (test_import_all and Scripts)"
|
||||
# test_all - flaky
|
||||
SKIPTEST="$SKIPTEST or (test_all and TestFetchAllProcesses)"
|
||||
# test_multi_sockets_procs - not sure why it fails
|
||||
SKIPTEST="$SKIPTEST or (test_multi_sockets_procs and TestSystemWideConnections)"
|
||||
%pytest_arch -n auto --ignore=psutil/tests/test_memleaks.py --ignore=psutil/tests/test_sudo.py -k "not ($SKIPTEST)"
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc CREDITS HISTORY.rst README.rst
|
||||
%{_docdir}/%{python_prefix}-psutil/scripts/
|
||||
%{python_sitearch}/psutil/
|
||||
%exclude %{python_sitearch}/psutil/tests
|
||||
%{python_sitearch}/psutil-%{version}.dist-info
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user