From 65304126b7317236f7c56283225e81f84dc666a510f86dee70ad9828db03dac3 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Tue, 21 Mar 2017 13:36:57 +0000 Subject: [PATCH] Accepting request 480661 from devel:languages:python:singlespec - update for singlespec OBS-URL: https://build.opensuse.org/request/show/480661 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=72 --- python-psutil.changes | 5 +++++ python-psutil.spec | 23 +++++++++++------------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/python-psutil.changes b/python-psutil.changes index f76ffe9..a8673ae 100644 --- a/python-psutil.changes +++ b/python-psutil.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 16 14:56:27 UTC 2017 - jmatejek@suse.com + +- update for singlespec + ------------------------------------------------------------------- Wed Mar 15 13:52:27 UTC 2017 - michael@stroeder.com diff --git a/python-psutil.spec b/python-psutil.spec index e7de8d2..bf11b45 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -1,7 +1,7 @@ # # spec file for package python-psutil # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-psutil Version: 5.2.0 Release: 0 @@ -23,16 +24,14 @@ Summary: A process utilities module for Python License: BSD-3-Clause Group: Development/Languages/Python Url: https://pypi.python.org/pypi/psutil/ -Source: https://pypi.io/packages/source/p/psutil/psutil-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: unzip +Source: https://files.pythonhosted.org/packages/source/p/psutil/psutil-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros Requires: net-tools Requires: procps BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%endif +%python_subpackages %description A graphical interface that lets you easily analyze and introspect unaltered running Python processes. @@ -40,20 +39,20 @@ A graphical interface that lets you easily analyze and introspect unaltered runn %prep %setup -q -n psutil-%{version} # Remove shebangs -sed -i "1d" psutil/{__init__.py,_compat.py,_psbsd.py,_pslinux.py,_psosx.py,_psposix.py,_pssunos.py,_pswindows.py} +sed -i "1s/#!.*//" psutil/{__init__.py,_compat.py,_psbsd.py,_pslinux.py,_psosx.py,_psposix.py,_pssunos.py,_pswindows.py} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install # not working due to lack of root priveleges # %check # make test # make memtest -%files +%files %{python_files} %defattr(-,root,root,-) %doc CREDITS scripts HISTORY.rst LICENSE README.rst %{python_sitearch}/psutil/