Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Move GTK3 setupext checks to within the process.#10885
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1390,13 +1390,8 @@ def check(self): | ||
return "installing; run-time loading from Python Tcl / Tk" | ||
def runtime_check(self): | ||
"""Checks whether TkAgg runtime dependencies are met.""" | ||
return importlib.util.find_spec("tkinter") is not None | ||
def get_extension(self): | ||
sources = [ | ||
@@ -1417,144 +1412,44 @@ def add_flags(self, ext): | ||
ext.libraries.extend(['dl']) | ||
class BackendGtk3Agg(OptionalBackendPackage): | ||
name = "gtk3agg" | ||
def check_requirements(self): | ||
ifnot any(map(importlib.util.find_spec, ["cairocffi", "cairo"])): | ||
raise CheckFailed("Requires cairocffi or pycairo to be installed.") | ||
try: | ||
import gi | ||
except ImportError: | ||
raise CheckFailed("Requires pygobject to be installed.") | ||
try: | ||
gi.require_version("Gtk", "3.0") | ||
except ValueError: | ||
raise CheckFailed( | ||
"Requires gtk3 development files to be installed.") | ||
except AttributeError: | ||
raise CheckFailed("pygobject version too old.") | ||
try: | ||
from gi.repository import Gtk, Gdk, GObject | ||
except (ImportError, RuntimeError): | ||
raise CheckFailed("Requires pygobject to be installed.") | ||
return "version {}.{}.{}".format( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. micro <-> minor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. thx, fixed | ||
Gtk.get_major_version(), | ||
Gtk.get_minor_version(), | ||
Gtk.get_micro_version()) | ||
def get_package_data(self): | ||
return {'matplotlib': ['mpl-data/*.glade']} | ||
class BackendGtk3Cairo(BackendGtk3Agg): | ||
name = "gtk3cairo" | ||
class BackendWxAgg(OptionalBackendPackage): | ||
name = "wxagg" | ||