|
|
cdbc42 |
diff -up matplotlib-1.2.0/setupext.py.remove-need-for-xvfb matplotlib-1.2.0/setupext.py
|
|
|
cdbc42 |
--- matplotlib-1.2.0/setupext.py.remove-need-for-xvfb 2013-03-05 16:48:16.785361527 -0500
|
|
|
cdbc42 |
+++ matplotlib-1.2.0/setupext.py 2013-03-05 16:50:57.535350535 -0500
|
|
|
cdbc42 |
@@ -656,20 +656,10 @@ def check_for_gtk():
|
|
|
cdbc42 |
'check for the presence of pygtk'
|
|
|
cdbc42 |
gotit = False
|
|
|
cdbc42 |
explanation = None
|
|
|
cdbc42 |
- try:
|
|
|
cdbc42 |
- import gtk
|
|
|
cdbc42 |
- except ImportError:
|
|
|
cdbc42 |
- explanation = 'Building for Gtk+ requires pygtk; you must be able to "import gtk" in your build/install environment'
|
|
|
cdbc42 |
- except RuntimeError:
|
|
|
cdbc42 |
- explanation = 'pygtk present but import failed'
|
|
|
cdbc42 |
- else:
|
|
|
cdbc42 |
- version = (2,2,0)
|
|
|
cdbc42 |
- if gtk.pygtk_version < version:
|
|
|
cdbc42 |
- explanation = "Error: GTK backend requires PyGTK %d.%d.%d (or later), " \
|
|
|
cdbc42 |
- "%d.%d.%d was detected." % (
|
|
|
cdbc42 |
- version + gtk.pygtk_version)
|
|
|
cdbc42 |
- else:
|
|
|
cdbc42 |
- gotit = True
|
|
|
cdbc42 |
+
|
|
|
cdbc42 |
+ # Don't try to detect if "import gtk" succeeds, as this requires a
|
|
|
cdbc42 |
+ # working X server, and $DISPLAY is unset in an rpm build.
|
|
|
cdbc42 |
+ gotit = True
|
|
|
cdbc42 |
|
|
|
cdbc42 |
if gotit:
|
|
|
cdbc42 |
module = make_extension('test', [])
|
|
|
cdbc42 |
@@ -684,27 +674,13 @@ def check_for_gtk():
|
|
|
cdbc42 |
return ".".join([str(x) for x in tup])
|
|
|
cdbc42 |
|
|
|
cdbc42 |
if gotit:
|
|
|
cdbc42 |
- import gobject
|
|
|
cdbc42 |
- if hasattr(gobject, 'pygobject_version'):
|
|
|
cdbc42 |
- pygobject_version = ver2str(gobject.pygobject_version)
|
|
|
cdbc42 |
- else:
|
|
|
cdbc42 |
- pygobject_version = '[pre-pygobject]'
|
|
|
cdbc42 |
- print_status("Gtk+", "gtk+: %s, glib: %s, pygtk: %s, pygobject: %s" %
|
|
|
cdbc42 |
- (ver2str(gtk.gtk_version), ver2str(gobject.glib_version),
|
|
|
cdbc42 |
- ver2str(gtk.pygtk_version), pygobject_version))
|
|
|
cdbc42 |
+ print_status("Gtk+", "(assuming it it present)")
|
|
|
cdbc42 |
else:
|
|
|
cdbc42 |
print_status("Gtk+", "no")
|
|
|
cdbc42 |
|
|
|
cdbc42 |
if explanation is not None:
|
|
|
cdbc42 |
print_message(explanation)
|
|
|
cdbc42 |
|
|
|
cdbc42 |
- # Switch off the event loop for PyGTK >= 2.15.0
|
|
|
cdbc42 |
- if gotit:
|
|
|
cdbc42 |
- try:
|
|
|
cdbc42 |
- gtk.set_interactive(False)
|
|
|
cdbc42 |
- except AttributeError: # PyGTK < 2.15.0
|
|
|
cdbc42 |
- pass
|
|
|
cdbc42 |
-
|
|
|
cdbc42 |
return gotit
|
|
|
cdbc42 |
|
|
|
cdbc42 |
def add_pygtk_flags(module):
|