diff --git a/_multibuild b/_multibuild
new file mode 100644
index 0000000..fcc7b97
--- /dev/null
+++ b/_multibuild
@@ -0,0 +1,3 @@
+
+ test
+
diff --git a/psutil-7.1.0.tar.gz b/psutil-7.1.0.tar.gz
deleted file mode 100644
index 7a545b5..0000000
--- a/psutil-7.1.0.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:655708b3c069387c8b77b072fc429a57d0e214221d01c0a772df7dfedcb3bcd2
-size 497660
diff --git a/psutil-7.1.1.tar.gz b/psutil-7.1.1.tar.gz
new file mode 100644
index 0000000..d85ddf1
--- /dev/null
+++ b/psutil-7.1.1.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:092b6350145007389c1cfe5716050f02030a05219d90057ea867d18fe8d372fc
+size 487067
diff --git a/python-psutil.changes b/python-psutil.changes
index d01d9d1..ae092e8 100644
--- a/python-psutil.changes
+++ b/python-psutil.changes
@@ -1,3 +1,16 @@
+-------------------------------------------------------------------
+Thu Oct 23 09:47:56 UTC 2025 - Markéta Machová
+
+- Exclude tests to mutibuild due to dependency cycle with python-xdist
+
+-------------------------------------------------------------------
+Mon Oct 20 09:55:27 UTC 2025 - Markéta Machová
+
+- Update to 7.1.1
+ * SunOS 10 is no longer supported.
+ * Tests that needs UNIX sockets should be properly marked for skip
+- Run tests with pytest (recommended by upstream)
+
-------------------------------------------------------------------
Fri Sep 26 08:06:59 UTC 2025 - John Paul Adrian Glaubitz
diff --git a/python-psutil.spec b/python-psutil.spec
index 5d47789..6e09b6f 100644
--- a/python-psutil.spec
+++ b/python-psutil.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-psutil
#
-# Copyright (c) 2025 SUSE LLC
+# 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
@@ -16,14 +16,21 @@
#
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
%ifarch x86_64 %{ix86}
+%define psuffix -%{flavor}
%bcond_without test
%else
-%bcond_with test
+ExclusiveArch: donotbuild
+%endif
+%else
+%define psuffix %{nil}
+%bcond_with test
%endif
%{?sle15_python_module_pythons}
-Name: python-psutil
-Version: 7.1.0
+Name: python-psutil%{psuffix}
+Version: 7.1.1
Release: 0
Summary: A process utilities module for Python
License: BSD-3-Clause
@@ -41,8 +48,11 @@ BuildRequires: pkgconfig(libsystemd)
%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
-BuildRequires: procps
%endif
%python_subpackages
@@ -51,11 +61,16 @@ A graphical interface that lets you easily analyze and introspect unaltered runn
%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
@@ -64,19 +79,28 @@ find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.p
%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 PYTHONDONTRWRITEBYTECODE=1
-mkdir testd
-pushd testd
-%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -Wa -m psutil.tests
-popd
+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
@@ -85,4 +109,6 @@ popd
%exclude %{python_sitearch}/psutil/tests
%{python_sitearch}/psutil-%{version}.dist-info
+%endif
+
%changelog