Accepting request 801216 from home:mnhauke
- Drop python2 - Add patch: * fix-tests.patch OBS-URL: https://build.opensuse.org/request/show/801216 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Glances?expand=0&rev=18
This commit is contained in:
parent
c93d588027
commit
3538e2b834
42
fix-tests.patch
Normal file
42
fix-tests.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
diff --git a/unitest-restful.py b/unitest-restful.py
|
||||||
|
index 7b77a2b..5f991bd 100755
|
||||||
|
--- a/unitest-restful.py
|
||||||
|
+++ b/unitest-restful.py
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
|
||||||
|
import shlex
|
||||||
|
import subprocess
|
||||||
|
+import sys
|
||||||
|
import time
|
||||||
|
import numbers
|
||||||
|
import unittest
|
||||||
|
@@ -64,7 +65,7 @@ class TestGlances(unittest.TestCase):
|
||||||
|
global pid
|
||||||
|
|
||||||
|
print('INFO: [TEST_000] Start the Glances Web Server')
|
||||||
|
- cmdline = "python -m glances -w -p %s" % SERVER_PORT
|
||||||
|
+ cmdline = "%s -m glances -w -p %s" % (sys.executable, SERVER_PORT)
|
||||||
|
print("Run the Glances Web Server on port %s" % SERVER_PORT)
|
||||||
|
args = shlex.split(cmdline)
|
||||||
|
pid = subprocess.Popen(args)
|
||||||
|
diff --git a/unitest-xmlrpc.py b/unitest-xmlrpc.py
|
||||||
|
index 7e52ec5..384fa46 100755
|
||||||
|
--- a/unitest-xmlrpc.py
|
||||||
|
+++ b/unitest-xmlrpc.py
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
import json
|
||||||
|
import shlex
|
||||||
|
import subprocess
|
||||||
|
+import sys
|
||||||
|
import time
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
@@ -53,7 +54,7 @@ class TestGlances(unittest.TestCase):
|
||||||
|
global pid
|
||||||
|
|
||||||
|
print('INFO: [TEST_000] Start the Glances Web Server')
|
||||||
|
- cmdline = "python -m glances -s -p %s" % SERVER_PORT
|
||||||
|
+ cmdline = "%s -m glances -s -p %s" % (sys.executable, SERVER_PORT)
|
||||||
|
print("Run the Glances Server on port %s" % SERVER_PORT)
|
||||||
|
args = shlex.split(cmdline)
|
||||||
|
pid = subprocess.Popen(args)
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 6 18:46:52 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- Drop python2
|
||||||
|
- Add patch:
|
||||||
|
* fix-tests.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 26 14:09:01 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
Thu Mar 26 14:09:01 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%define skip_python2 1
|
||||||
Name: python-Glances
|
Name: python-Glances
|
||||||
Version: 3.1.4.1
|
Version: 3.1.4.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -27,6 +28,7 @@ Source: https://github.com/nicolargo/glances/archive/v%{version}.tar.gz
|
|||||||
Patch0: adjust-data-files.patch
|
Patch0: adjust-data-files.patch
|
||||||
Patch1: remove-shebang.patch
|
Patch1: remove-shebang.patch
|
||||||
Patch2: skip-online-tests.patch
|
Patch2: skip-online-tests.patch
|
||||||
|
Patch3: fix-tests.patch
|
||||||
BuildRequires: %{python_module bottle}
|
BuildRequires: %{python_module bottle}
|
||||||
BuildRequires: %{python_module future}
|
BuildRequires: %{python_module future}
|
||||||
BuildRequires: %{python_module psutil >= 5.6.3}
|
BuildRequires: %{python_module psutil >= 5.6.3}
|
||||||
@ -42,9 +44,7 @@ Recommends: python-curses
|
|||||||
Provides: python-glances = %{version}
|
Provides: python-glances = %{version}
|
||||||
Obsoletes: python-glances < %{version}
|
Obsoletes: python-glances < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%ifpython3
|
|
||||||
Provides: glances
|
Provides: glances
|
||||||
%endif
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
Loading…
x
Reference in New Issue
Block a user