[packages/python-psutil] - updated to 5.4.6

qboosh qboosh at pld-linux.org
Thu Jul 19 21:18:26 CEST 2018


commit 658986deeb512da3994059f6ae2dfa9b25ab0986
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Jul 19 21:20:20 2018 +0200

    - updated to 5.4.6

 python-psutil.spec | 46 ++++++++++++++++++++++++++++++++++------------
 1 file changed, 34 insertions(+), 12 deletions(-)
---
diff --git a/python-psutil.spec b/python-psutil.spec
index d5ba5a8..c5b58a5 100644
--- a/python-psutil.spec
+++ b/python-psutil.spec
@@ -1,8 +1,8 @@
 # TODO:
-# - Fix tests
+# - Fix tests (a few fail)
 #
 # Conditional build:
-%bcond_with	tests	# do not perform "make test"
+%bcond_with	tests	# unit tests
 %bcond_without  python2 # CPython 2.x module
 %bcond_without  python3 # CPython 3.x module
 
@@ -10,19 +10,20 @@
 Summary:	A cross-platform process and system utilities module for Python
 Summary(pl.UTF-8):	Wieloplatformowe narzędzia do procesów i systemu dla Pythona
 Name:		python-%{module}
-Version:	5.4.5
-Release:	2
+Version:	5.4.6
+Release:	1
 License:	BSD
 Group:		Development/Languages/Python
-#Source0Download: https://pypi.python.org/simple/psutil/
-Source0:	https://github.com/giampaolo/psutil/archive/release-%{version}.tar.gz
-# Source0-md5:	ce3e6b33706dd73eea4c37566eb9a0a1
+#Source0Download: https://pypi.org/simple/psutil/
+Source0:	https://github.com/giampaolo/psutil/archive/release-%{version}/%{module}-%{version}.tar.gz
+# Source0-md5:	32d606eebd13ceea0fa1231c42f8548a
 URL:		https://github.com/giampaolo/psutil
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
 %if %{with python2}
 BuildRequires:	python-devel >= 1:2.6
 %if %{with tests}
+BuildRequires:	python-ipaddress
 BuildRequires:	python-mock
 %if "%{py_ver}" < "2.7"
 BuildRequires:	python-unittest2
@@ -30,8 +31,8 @@ BuildRequires:	python-unittest2
 %endif
 %endif
 %if %{with python3}
-BuildRequires:	python3-devel >= 1:3.2
-BuildRequires:	python3-modules >= 1:3.2
+BuildRequires:	python3-devel >= 1:3.4
+BuildRequires:	python3-modules >= 1:3.4
 %endif
 Requires:	python-modules >= 1:2.6
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -52,7 +53,7 @@ przez narzędzia linii komend.
 Summary:	A cross-platform process and system utilities module for Python
 Summary(pl.UTF-8):	Wieloplatformowe narzędzia do procesów i systemu dla Pythona
 Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.2
+Requires:	python3-modules >= 1:3.4
 
 %description -n python3-%{module}
 Module providing an interface for retrieving information on all
@@ -69,17 +70,38 @@ offered by command line tools.
 %prep
 %setup -q -n %{module}-release-%{version}
 
+%if %{with tests}
+# prepare subdir to run tests from
+# (cannot use topdir with PYTHONPATH=build-?/lib.* because python finds psutil dir without
+# _psutil_linux module inside in cwd before build-?/lib.*/psutil dir from PYTHONPATH)
+install -d tests
+ln -sf ../scripts tests
+%endif
+
 %build
 %if %{with python2}
 %py_build
+# "test" target causes endless loop, so...
 
-%{?with_tests:export PYTHONPATH=$(echo $(pwd)/build-2/lib.*); %{__python} psutil/tests/__main__.py}
+%if %{with tests}
+cd tests
+ln -snf ../build-2/lib.*/psutil psutil
+PYTHONPATH=$(pwd) \
+%{__python} -m psutil.tests
+cd ..
+%endif
 %endif
 
 %if %{with python3}
 %py3_build
 
-%{?with_tests:export PYTHONPATH=$(echo $(pwd)/build-3/lib.*); %{__python3} psutil/tests/__main__.py}
+%if %{with tests}
+cd tests
+ln -snf ../build-3/lib.*/psutil psutil
+PYTHONPATH=$(pwd) \
+%{__python3} -m psutil.tests
+cd ..
+%endif
 %endif
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-psutil.git/commitdiff/658986deeb512da3994059f6ae2dfa9b25ab0986



More information about the pld-cvs-commit mailing list