Skip to content

Build failes under ubuntu 13.04 #1949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions setup.cfg.template
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
#tkagg = auto
#macosx = auto
#windowing = auto
#gtk3cairo = auto
#gtk3agg = auto

[rc_options]
# User-configurable options
Expand Down
34 changes: 27 additions & 7 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,12 +1424,19 @@ def get_extension(self):

def backend_gtk3agg_internal_check(x):
try:
from gi.repository import Gtk, Gdk, GObject
import gi
except ImportError:
return (False, "Requires pygobject to be installed.")

if sys.version_info[0] >= 3:
return (False, "gtk3agg does not work on Python 3")
try:
gi.require_version("Gtk", "3.0")
except ValueError:
return (False, "Requires gtk3 development files to be installed.")

try:
from gi.repository import Gtk, Gdk, GObject
except ImportError:
return (False, "Requires pygobject to be installed.")

return (True, "version %s.%s.%s" % (
Gtk.get_major_version(),
Expand All @@ -1444,6 +1451,9 @@ def check(self):
if 'TRAVIS' in os.environ:
raise CheckFailed("Can't build with Travis")

if sys.version_info[0] >= 3:
return "gtk3agg backend does not work on Python 3"

# This check needs to be performed out-of-process, because
# importing gi and then importing regular old pygtk afterward
# segfaults the interpreter.
Expand All @@ -1468,6 +1478,16 @@ def backend_gtk3cairo_internal_check(x):
except ImportError:
return (False, "Requires cairo to be installed.")

try:
import gi
except ImportError:
return (False, "Requires pygobject to be installed.")

try:
gi.require_version("Gtk", "3.0")
except ValueError:
return (False, "Requires gtk3 development files to be installed.")

try:
from gi.repository import Gtk, Gdk, GObject
except ImportError:
Expand Down Expand Up @@ -1611,7 +1631,7 @@ def check(self):
try:
import pyqtconfig
except ImportError:
raise CheckFailed("not found")
raise CheckFailed("pyqt not found")
else:
try:
qt_version = pyqtconfig.Configuration().qt_version
Expand Down Expand Up @@ -1641,7 +1661,7 @@ def check(self):
try:
from PyQt4 import pyqtconfig
except ImportError:
raise CheckFailed("not found")
raise CheckFailed("PyQt4 not found")
else:

BackendAgg.force = True
Expand All @@ -1660,7 +1680,7 @@ def check(self):
from PySide import __version__
from PySide import QtCore
except ImportError:
raise CheckFailed("not found")
raise CheckFailed("PySide not found")
else:
BackendAgg.force = True

Expand All @@ -1675,7 +1695,7 @@ def check(self):
try:
import cairo
except ImportError:
raise CheckFailed("not found")
raise CheckFailed("cairo not found")
else:
return "version %s" % cairo.version

Expand Down