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
|
|
|
#
|
2017-03-21 13:36:57 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
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
|
|
|
|
2012-03-23 09:41:39 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2012-03-23 09:45:12 +00:00
|
|
|
|
2012-10-08 09:27:07 +00:00
|
|
|
|
2017-07-14 11:26:23 +00:00
|
|
|
%bcond_with test
|
|
|
|
|
2017-03-21 13:36:57 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-03-23 09:45:12 +00:00
|
|
|
Name: python-psutil
|
2017-09-25 09:56:29 +00:00
|
|
|
Version: 5.3.1
|
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
|
2012-03-23 09:41:39 +00:00
|
|
|
Group: Development/Languages/Python
|
2014-09-30 12:02:29 +00:00
|
|
|
Url: https://pypi.python.org/pypi/psutil/
|
2017-03-21 13:36:57 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
|
|
|
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
|
2014-09-30 12:02:29 +00:00
|
|
|
Requires: net-tools
|
|
|
|
Requires: procps
|
2012-10-08 09:27:07 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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}
|
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/
|
|
|
|
find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.py" -exec sed -i "s|#!/usr/bin/env python|#!%__$python|" {} \;
|
|
|
|
find %{buildroot}%{$python_sitearch}/psutil/tests/ -type f -name "*.py" -exec sed -i "s|#!/usr/bin/env python|#!%__$python|" {} \;
|
|
|
|
chmod a+x %{buildroot}%{$python_sitearch}/psutil/tests/*.py
|
|
|
|
chmod a-x %{buildroot}%{$python_sitearch}/psutil/tests/__init__.py
|
|
|
|
$python -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/psutil/tests/
|
|
|
|
$python -O -m compileall -d %{$python_sitearch} %{buildroot}%{$python_sitearch}/psutil/tests/
|
|
|
|
%fdupes %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
|
|
|
%fdupes %{buildroot}%{$python_sitearch}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with test}
|
|
|
|
%check
|
|
|
|
make test
|
|
|
|
make memtest
|
|
|
|
%endif
|
2012-03-23 09:41:39 +00:00
|
|
|
|
2017-03-21 13:36:57 +00:00
|
|
|
%files %{python_files}
|
2012-03-23 09:41:39 +00:00
|
|
|
%defattr(-,root,root,-)
|
2017-07-14 11:26:23 +00:00
|
|
|
%doc CREDITS HISTORY.rst LICENSE README.rst
|
|
|
|
%{_docdir}/%{python_prefix}-psutil/scripts/
|
2012-05-25 06:56:56 +00:00
|
|
|
%{python_sitearch}/psutil/
|
2015-06-29 11:19:41 +00:00
|
|
|
%{python_sitearch}/psutil/_psutil_*.so
|
2014-09-30 12:02:29 +00:00
|
|
|
%{python_sitearch}/psutil-%{version}-py*.egg-info
|
2012-05-25 06:56:56 +00:00
|
|
|
|
2012-03-23 09:41:39 +00:00
|
|
|
%changelog
|