Bump gtk and pygobject deps to 3.14

We need to bump the gtk dep to at least 3.10 for GtkRevealer usage,
and I want to bump the pygobject higher to drop some bug workarounds.

But since the oldest thing I have that meets those requirements is
RHEL/Centos 7.3 which is at 3.14 for both, set those as the minimum
versions since that's what I'll be testing against. They are still
1.5 years old and only a bit over a year newer than the previous
versions, so it's not a huge change.
This commit is contained in:
Cole Robinson 2016-05-17 17:07:48 -04:00
parent cb4909dffb
commit dfcac3fe9c
27 changed files with 44 additions and 40 deletions

13
INSTALL
View File

@ -24,19 +24,16 @@ setup.py generally has all the build and install commands, for more info see:
Pre-requisite software
======================
virt-manager was ported to GTK3 at the beginning of 2013. Older GTK3
or pygobject3 versions likely will not work for running virt-manager.
A detailed dependency list can be found in virt-manager.spec.in
Earliest tested versions of major components:
Minimum version requirements of major components:
python >= 2.7
gtk3 >= 3.6
libvirt-python >= 0.4.0
pygobject3 >= 3.4
gtk3 >= 3.14
libvirt-python >= 0.6.0
pygobject3 >= 3.14
libosinfo >= 0.2.10
A more detailed dependency list can be found in virt-manager.spec.in.
On Debian or Ubuntu based distributions, you need to install the
gobject-introspection bindings for some depedencies like libvirt-glib
and libosinfo. Look for package names that start with 'gir', for example

View File

@ -110,13 +110,13 @@ class TestMisc(unittest.TestCase):
if required_version is None:
raise AssertionError("ui file=%s doesn't have a <requires> "
"tag for gtk+, it should say 3.8")
"tag for gtk+, it should say 3.10")
if (int(required_version.split(".")[0]) != 3 or
int(required_version.split(".")[1]) != 8):
int(required_version.split(".")[1]) != 14):
failures.append((filename, required_version))
if failures:
raise AssertionError("The following files should require gtk "
"version of gtk-3.8, which is what we target:\n" +
"version of gtk-3.10, which is what we target:\n" +
"\n".join([("%s version=%s" % tup) for tup in failures]))

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAboutDialog" id="vmm-about">
<property name="can_focus">False</property>
<property name="destroy_with_parent">True</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">67000</property>
<property name="step_increment">1</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">1000000</property>
<property name="step_increment">0.10000000000000001</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkWindow" id="vmm-progress">
<property name="can_focus">False</property>
<property name="border_width">12</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkDialog" id="vmm-choose-cd">
<property name="can_focus">True</property>
<property name="has_focus">True</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">128</property>
<property name="step_increment">1</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">4095</property>
<property name="step_increment">1</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkWindow" id="vmm-create-pool">
<property name="height_request">350</property>
<property name="can_focus">False</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100000</property>
<property name="value">1</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkWindow" id="vmm-delete">
<property name="width_request">450</property>
<property name="height_request">350</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment6">
<property name="upper">18446744073709</property>
<property name="step_increment">100</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment4">
<property name="lower">5900</property>
<property name="upper">50000</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkImage" id="image3">
<property name="visible">True</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAccelGroup" id="accelgroup1"/>
<object class="GtkImage" id="image2">
<property name="visible">True</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">70000</property>
<property name="step_increment">1</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkGrid" id="net-source-box">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">60</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkWindow" id="vmm-storage-browse">
<property name="can_focus">False</property>
<property name="border_width">6</property>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.8"/>
<requires lib="gtk+" version="3.14"/>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>

View File

@ -27,7 +27,6 @@ import sys
import traceback
import gi
from gi.repository import GObject
gi.require_version('LibvirtGLib', '1.0')
from gi.repository import LibvirtGLib
@ -43,10 +42,10 @@ import warnings # pylint: disable=wrong-import-order
warnings.simplefilter("ignore")
try:
# Avoid a deprecation warning about threads_init
gi.check_version("3.9.1")
gi.check_version("3.14.0")
except (ValueError, AttributeError):
GObject.threads_init()
print "pygobject3 3.14.0 or later is required."
sys.exit(1)
def _show_startup_error(msg, details):
@ -171,6 +170,10 @@ def main():
from gi.repository import Gtk
leftovers = sys.argv[1:]
if Gtk.check_version(3, 14, 0):
print "gtk3 3.14.0 or later is required."
return
# This will error if Gtk wasn't correctly initialized
Gtk.Window()
@ -186,7 +189,7 @@ def main():
msg += ": Could not open display: %s" % display
logging.debug("".join(traceback.format_exc()))
print msg
return 1
return
finally:
sys.argv = origargv
@ -197,6 +200,10 @@ def main():
if leftovers:
raise RuntimeError("Unhandled command line options '%s'" % leftovers)
logging.debug("PyGObject version: %d.%d.%d",
gi.version_info[0],
gi.version_info[1],
gi.version_info[2])
logging.debug("GTK version: %d.%d.%d",
Gtk.get_major_version(),
Gtk.get_minor_version(),