1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
https://bugs.gentoo.org/show_bug.cgi?id=481564
https://github.com/matplotlib/matplotlib/commit/1b3106c1bcd6017455232e8c974f1af8383a010c
--- a/setupext.py
+++ b/setupext.py
@@ -1463,7 +1463,7 @@ def backend_gtk3agg_internal_check(x):
try:
from gi.repository import Gtk, Gdk, GObject
- except ImportError:
+ except (ImportError, RuntimeError):
return (False, "Requires pygobject to be installed.")
return (True, "version %s.%s.%s" % (
@@ -1489,9 +1489,14 @@ def check(self):
p = multiprocessing.Pool()
except:
return "unknown (can not use multiprocessing to determine)"
- success, msg = p.map(backend_gtk3agg_internal_check, [0])[0]
- p.close()
- p.join()
+ try:
+ success, msg = p.map(backend_gtk3agg_internal_check, [0])[0]
+ except:
+ success = False
+ msg = "Could not determine"
+ finally:
+ p.close()
+ p.join()
if success:
BackendAgg.force = True
@@ -1521,7 +1526,7 @@ def backend_gtk3cairo_internal_check(x):
try:
from gi.repository import Gtk, Gdk, GObject
- except ImportError:
+ except (RuntimeError, ImportError):
return (False, "Requires pygobject to be installed.")
return (True, "version %s.%s.%s" % (
|