2012-03-23 10:41:39 +01:00
|
|
|
#
|
2012-03-23 10:45:12 +01:00
|
|
|
# spec file for package python-psutil
|
2012-03-23 10:41:39 +01:00
|
|
|
#
|
2024-03-22 11:53:53 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2012-03-23 10:41:39 +01:00
|
|
|
#
|
|
|
|
# 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.
|
2012-03-23 10:45:12 +01:00
|
|
|
|
2018-11-02 09:17:34 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-23 10:41:39 +01:00
|
|
|
#
|
2012-03-23 10:45:12 +01:00
|
|
|
|
2012-10-08 11:27:07 +02:00
|
|
|
|
2019-03-21 10:43:00 +01:00
|
|
|
%ifarch x86_64 %{ix86}
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2023-04-21 16:11:27 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2012-03-23 10:45:12 +01:00
|
|
|
Name: python-psutil
|
2023-12-27 14:56:04 +01:00
|
|
|
Version: 5.9.7
|
2012-03-23 10:41:39 +01:00
|
|
|
Release: 0
|
2012-03-23 10:45:12 +01:00
|
|
|
Summary: A process utilities module for Python
|
2012-10-08 11:27:07 +02:00
|
|
|
License: BSD-3-Clause
|
2019-03-21 10:43:00 +01:00
|
|
|
URL: https://github.com/giampaolo/psutil
|
2017-03-21 14:36:57 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
2020-08-21 17:27:58 +02:00
|
|
|
# PATCH-FIX-UPSTREAM skip_failing_tests.patch gh#giampaolo/psutil#1635 mcepl@suse.com
|
|
|
|
# skip tests failing because of incomplete emulation of the environment in osc build
|
|
|
|
Patch2: skip_failing_tests.patch
|
2021-01-29 10:54:20 +01:00
|
|
|
# PATCH-FIX-SLE skip_rlimit_tests_on_python2.patch alarrosa@suse.com
|
|
|
|
Patch3: skip_rlimit_tests_on_python2.patch
|
2022-06-23 23:14:15 +02:00
|
|
|
# PATCH-FIX-SLE adopt change of used memory of procps
|
|
|
|
Patch4: mem-used-bsc1181475.patch
|
2017-03-21 14:36:57 +01:00
|
|
|
BuildRequires: %{python_module devel}
|
2023-10-02 18:49:15 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2017-03-21 14:36:57 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-10-25 15:53:10 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2017-07-14 13:26:23 +02:00
|
|
|
BuildRequires: fdupes
|
2017-03-21 14:36:57 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-08-18 22:54:08 +02:00
|
|
|
Requires: procps
|
2024-03-22 11:53:53 +01:00
|
|
|
BuildRequires: pkgconfig(libsystemd)
|
2019-03-21 10:43:00 +01:00
|
|
|
%if %{with test}
|
2023-10-02 18:49:15 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2023-09-06 14:37:42 +02:00
|
|
|
BuildRequires: /usr/bin/who
|
2023-10-02 18:49:15 +02:00
|
|
|
%endif
|
2018-06-14 08:31:08 +02:00
|
|
|
BuildRequires: net-tools
|
|
|
|
BuildRequires: procps
|
|
|
|
%endif
|
2017-03-21 14:36:57 +01:00
|
|
|
%python_subpackages
|
2012-03-23 10:41:39 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
A graphical interface that lets you easily analyze and introspect unaltered running Python processes.
|
|
|
|
|
|
|
|
%prep
|
2023-12-27 14:56:04 +01:00
|
|
|
%autosetup -p1 -n psutil-%{version}
|
2019-03-21 10:43:00 +01:00
|
|
|
|
2012-03-23 10:41:39 +01:00
|
|
|
%build
|
2023-10-02 18:49:15 +02:00
|
|
|
%pyproject_wheel
|
2012-03-23 10:41:39 +01:00
|
|
|
|
|
|
|
%install
|
2023-10-02 18:49:15 +02:00
|
|
|
%pyproject_install
|
2012-03-23 10:41:39 +01:00
|
|
|
|
2017-07-14 13:26:23 +02:00
|
|
|
%{python_expand mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-psutil
|
|
|
|
cp -r scripts %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
2020-11-03 12:04:32 +01:00
|
|
|
find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python.*|#!%{__$python}|" {} \;
|
2017-07-14 13:26:23 +02:00
|
|
|
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
|
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
}
|
|
|
|
|
2019-03-21 10:43:00 +01:00
|
|
|
%if %{with test}
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
export PSUTIL_TESTING=1
|
2022-07-15 12:45:42 +02:00
|
|
|
export PSUTIL_DEBUG=1
|
|
|
|
export PYTHONDONTRWRITEBYTECODE=1
|
|
|
|
mkdir testd
|
|
|
|
pushd testd
|
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -Wa -m psutil.tests
|
|
|
|
popd
|
2019-03-21 10:43:00 +01:00
|
|
|
%endif
|
|
|
|
|
2017-03-21 14:36:57 +01:00
|
|
|
%files %{python_files}
|
2018-04-14 21:02:57 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc CREDITS HISTORY.rst README.rst
|
2017-07-14 13:26:23 +02:00
|
|
|
%{_docdir}/%{python_prefix}-psutil/scripts/
|
2012-05-25 08:56:56 +02:00
|
|
|
%{python_sitearch}/psutil/
|
2022-07-15 12:45:42 +02:00
|
|
|
%exclude %{python_sitearch}/psutil/tests
|
2023-10-02 18:49:15 +02:00
|
|
|
%{python_sitearch}/psutil-%{version}.dist-info
|
2012-05-25 08:56:56 +02:00
|
|
|
|
2012-03-23 10:41:39 +01:00
|
|
|
%changelog
|