Accepting request 510263 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/510263 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-psutil?expand=0&rev=35
This commit is contained in:
commit
8dace4e39d
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 11 14:24:34 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix various rpmlint warnings and errors
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Apr 29 16:13:29 UTC 2017 - michael@stroeder.com
|
Sat Apr 29 16:13:29 UTC 2017 - michael@stroeder.com
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%bcond_with test
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-psutil
|
Name: python-psutil
|
||||||
Version: 5.2.2
|
Version: 5.2.2
|
||||||
@ -27,6 +29,7 @@ Url: https://pypi.python.org/pypi/psutil/
|
|||||||
Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: net-tools
|
Requires: net-tools
|
||||||
Requires: procps
|
Requires: procps
|
||||||
@ -47,14 +50,30 @@ sed -i "1s/#!.*//" psutil/{__init__.py,_compat.py,_psbsd.py,_pslinux.py,_psosx.p
|
|||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
|
||||||
# not working due to lack of root priveleges
|
%{python_expand mkdir -p %{buildroot}%{_docdir}/%{$python_prefix}-psutil
|
||||||
# %check
|
cp -r scripts %{buildroot}%{_docdir}/%{$python_prefix}-psutil/
|
||||||
# make test
|
find %{buildroot}%{_docdir}/%{$python_prefix}-psutil/scripts/ -type f -name "*.py" -exec sed -i "s|#!/usr/bin/env python|#!%__$python|" {} \;
|
||||||
# make memtest
|
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
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc CREDITS scripts HISTORY.rst LICENSE README.rst
|
%doc CREDITS HISTORY.rst LICENSE README.rst
|
||||||
|
%{_docdir}/%{python_prefix}-psutil/scripts/
|
||||||
%{python_sitearch}/psutil/
|
%{python_sitearch}/psutil/
|
||||||
%{python_sitearch}/psutil/_psutil_*.so
|
%{python_sitearch}/psutil/_psutil_*.so
|
||||||
%{python_sitearch}/psutil-%{version}-py*.egg-info
|
%{python_sitearch}/psutil-%{version}-py*.egg-info
|
||||||
|
Loading…
x
Reference in New Issue
Block a user