Improve python matplotlib/gtk sandboxing
It was looking for font configs outside of the sandbox. This was
generating a lot of warnings on buster.
Change-Id: I7c2e9c03cc8fbdca7b951e7be404fb20c3a7d3d3
diff --git a/debian/python_gi_init.patch b/debian/python_gi_init.patch
index 97ca2dc..ee09ccf 100644
--- a/debian/python_gi_init.patch
+++ b/debian/python_gi_init.patch
@@ -1,6 +1,6 @@
--- a/__init__.py 1969-12-31 16:00:00.000000000 -0800
+++ b/__init__.py 2018-10-17 21:45:04.908201161 -0700
-@@ -29,6 +29,11 @@ import os
+@@ -29,6 +29,16 @@ import os
import importlib
import types
@@ -9,6 +9,11 @@
+ 'x86_64-linux-gnu',
+ 'girepository-1.0')
+
++# Tell fontconfig where to find the sandboxed font files.
++os.environ["FONTCONFIG_PATH"] = os.path.join(_base, "etc/fonts/")
++os.environ["FONTCONFIG_FILE"] = os.path.join(_base, "etc/fonts/fonts.conf")
++os.environ["FONTCONFIG_SYSROOT"] = _base
++
_static_binding_error = ('When using gi.repository you must not import static '
'modules like "gobject". Please change all occurrences '
'of "import gobject" to "from gi.repository import GObject". '