Skip to content

Commit

Permalink
Add _GTK_API for testing purposes.
Browse files Browse the repository at this point in the history
  • Loading branch information
anntzer committed Oct 21, 2021
1 parent 5618fa6 commit 1a027fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/mplcairo/_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import functools
import importlib
import os
import sys

import matplotlib as mpl
Expand All @@ -18,6 +19,8 @@ def get_matplotlib_gtk_backend():
versions = [4]
elif required == "3.0":
versions = [3]
elif os.environ.get("_GTK_API"): # Private undocumented API.
versions = [int(os.environ["_GTK_API"])]
else:
versions = [4, 3]
for version in versions:
Expand Down

0 comments on commit 1a027fc

Please sign in to comment.