Skip to content

Commit

Permalink
#4235 make it possible to call without cairo / pango installed
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed May 21, 2024
1 parent aadcc3a commit ead682a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions xpra/gtk/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,14 @@ def MAJORMICROMINOR(name, module):

MAJORMICROMINOR("gtk", gi_import("Gtk"))
MAJORMICROMINOR("glib", gi_import("GLib"))
import cairo
av("cairo", parse_version(cairo.version_info)) # pylint: disable=no-member
pango = gi_import("Pango")
av("pango", parse_version(pango.version_string()))
try:
import cairo
av("cairo", parse_version(cairo.version_info)) # pylint: disable=no-member
except ImportError:
pass
try:
pango = gi_import("Pango")
av("pango", parse_version(pango.version_string()))
except ImportError:
pass
return GTK_VERSION_INFO.copy()

0 comments on commit ead682a

Please sign in to comment.