2012-03-23 09:41:39 +00:00
|
|
|
#
|
2012-03-23 09:45:12 +00:00
|
|
|
# spec file for package python-psutil
|
2012-03-23 09:41:39 +00:00
|
|
|
#
|
2023-04-21 14:11:27 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-03-23 09:41:39 +00: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 09:45:12 +00:00
|
|
|
|
2018-11-02 08:17:34 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-03-23 09:41:39 +00:00
|
|
|
#
|
2012-03-23 09:45:12 +00:00
|
|
|
|
2012-10-08 09:27:07 +00:00
|
|
|
|
2019-09-10 13:20:31 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2019-03-21 09:43:00 +00:00
|
|
|
%ifarch x86_64 %{ix86}
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2020-03-14 07:46:58 +00:00
|
|
|
%bcond_without python2
|
2023-04-21 14:11:27 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2012-03-23 09:45:12 +00:00
|
|
|
Name: python-psutil
|
2023-05-03 09:07:06 +00:00
|
|
|
Version: 5.9.5
|
2012-03-23 09:41:39 +00:00
|
|
|
Release: 0
|
2012-03-23 09:45:12 +00:00
|
|
|
Summary: A process utilities module for Python
|
2012-10-08 09:27:07 +00:00
|
|
|
License: BSD-3-Clause
|
2019-03-21 09:43:00 +00:00
|
|
|
URL: https://github.com/giampaolo/psutil
|
2017-03-21 13:36:57 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
2020-08-21 15:27:58 +00: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 09:54:20 +00:00
|
|
|
# PATCH-FIX-SLE skip_rlimit_tests_on_python2.patch alarrosa@suse.com
|
|
|
|
Patch3: skip_rlimit_tests_on_python2.patch
|
2022-06-23 21:14:15 +00:00
|
|
|
# PATCH-FIX-SLE adopt change of used memory of procps
|
|
|
|
Patch4: mem-used-bsc1181475.patch
|
2023-08-23 11:06:16 +00:00
|
|
|
# PATCH-FIX-UPSTREAM logind_y2038.patch gh#giampaolo/psutil#2300 aplanas@suse.com
|
|
|
|
Patch5: logind_y2038.patch
|
2017-03-21 13:36:57 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2017-07-14 11:26:23 +00:00
|
|
|
BuildRequires: fdupes
|
2017-03-21 13:36:57 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-08-18 20:54:08 +00:00
|
|
|
Requires: procps
|
2023-08-23 11:06:16 +00:00
|
|
|
BuildRequires: systemd
|
|
|
|
BuildRequires: systemd-devel
|
2019-03-21 09:43:00 +00:00
|
|
|
%if %{with test}
|
2018-06-14 06:31:08 +00:00
|
|
|
BuildRequires: net-tools
|
|
|
|
BuildRequires: procps
|
2020-03-14 07:46:58 +00:00
|
|
|
%if %{with python2}
|
2018-08-14 11:24:15 +00:00
|
|
|
BuildRequires: python-ipaddress
|
|
|
|
BuildRequires: python-mock
|
2022-12-08 21:03:53 +00:00
|
|
|
BuildRequires: python-unittest2
|
2019-03-21 09:43:00 +00:00
|
|
|
%endif
|
2020-03-14 07:46:58 +00:00
|
|
|
%endif
|
2018-06-14 06:31:08 +00:00
|
|
|
%ifpython2
|
|
|
|
Requires: python-ipaddress
|
|
|
|
%endif
|
2017-03-21 13:36:57 +00:00
|
|
|
%python_subpackages
|
2012-03-23 09:41:39 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
A graphical interface that lets you easily analyze and introspect unaltered running Python processes.
|
|
|
|
|
|
|
|
%prep
|
2012-03-23 09:45:12 +00:00
|
|
|
%setup -q -n psutil-%{version}
|
2020-03-14 07:46:58 +00:00
|
|
|
%autopatch -p1
|
2019-03-21 09:43:00 +00:00
|
|
|
|
2012-10-08 09:27:07 +00:00
|
|
|
# Remove shebangs
|
2017-03-21 13:36:57 +00:00
|
|
|
sed -i "1s/#!.*//" psutil/{__init__.py,_compat.py,_psbsd.py,_pslinux.py,_psosx.py,_psposix.py,_pssunos.py,_pswindows.py}
|
2012-03-23 09:45:12 +00:00
|
|
|
|
2012-03-23 09:41:39 +00:00
|
|
|
%build
|
2017-03-21 13:36:57 +00:00
|
|
|
%python_build
|
2012-03-23 09:41:39 +00:00
|
|
|
|
|
|
|
%install
|
2017-03-21 13:36:57 +00:00
|
|
|
%python_install
|
2012-03-23 09:41:39 +00:00
|
|
|
|
2017-07-14 11:26:23 +00:00
|
|
|
%{python_expand mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-psutil
|
|
|
|
cp -r scripts %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
2020-11-03 11:04:32 +00:00
|
|
|
find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.py" -exec sed -i "s|#!%{_bindir}/env python.*|#!%{__$python}|" {} \;
|
2017-07-14 11:26:23 +00:00
|
|
|
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
|
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
}
|
|
|
|
|
2019-03-21 09:43:00 +00:00
|
|
|
%if %{with test}
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
export PSUTIL_TESTING=1
|
2022-07-15 10:45:42 +00: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 09:43:00 +00:00
|
|
|
%endif
|
|
|
|
|
2017-03-21 13:36:57 +00:00
|
|
|
%files %{python_files}
|
2018-04-14 19:02:57 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc CREDITS HISTORY.rst README.rst
|
2017-07-14 11:26:23 +00:00
|
|
|
%{_docdir}/%{python_prefix}-psutil/scripts/
|
2012-05-25 06:56:56 +00:00
|
|
|
%{python_sitearch}/psutil/
|
2022-07-15 10:45:42 +00:00
|
|
|
%exclude %{python_sitearch}/psutil/tests
|
|
|
|
%{python_sitearch}/psutil-%{version}*-info
|
2012-05-25 06:56:56 +00:00
|
|
|
|
2012-03-23 09:41:39 +00:00
|
|
|
%changelog
|