!18 Modify tuna config to fix use gtk issue

From: @cherry530 
Reviewed-by: @gitee-cmd 
Signed-off-by: @gitee-cmd
This commit is contained in:
openeuler-ci-bot 2022-12-30 02:55:27 +00:00 committed by Gitee
commit 607d095b91
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,14 @@
diff --git a/tuna/config.py b/tuna/config.py
index 019317f..08a536f 100644
--- a/tuna/config.py
+++ b/tuna/config.py
@@ -1,5 +1,8 @@
import io, os, re, fnmatch
-import sys, gtk
+import sys
+import gi
+gi.require_version('Gtk', '3.0')
+from gi.repository import Gtk as gtk
import codecs, configparser
from time import localtime, strftime
from subprocess import Popen, PIPE, STDOUT, call

View File

@ -1,11 +1,12 @@
Name: tuna
Version: 0.14.1
Release: 1
Release: 2
Summary: Application tuning GUI & command line utility
License: GPLv2
URL: https://rt.wiki.kernel.org/index.php/Tuna
Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz
Patch0: oscilloscope-move-from-pygtk2-to-gtk3-gobject.patch
Patch1: tuna-move-from-pygtk-to-gtk3-gobject.patch
BuildArch: noarch
BuildRequires: python3-devel gettext
Requires: python3-ethtool python3-linux-procfs >= 0.6 python3-schedutils >= 0.6
@ -88,6 +89,9 @@ done
%doc ChangeLog
%changelog
* Fri Dec 30 2022 xu_ping <xuping33@h-partners.com> - 0.14.1-2
- Modify tuna config.py use gtk3
* Fri Sep 11 2020 maminjie <maminjie1@huawei.com> - 0.14.1-1
- Upgrade to 0.14.1