blob: ee09ccfc89e0a7568f474dfd0748f59fcb5cc9ee [file] [log] [blame]
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -07001--- a/__init__.py 1969-12-31 16:00:00.000000000 -0800
2+++ b/__init__.py 2018-10-17 21:45:04.908201161 -0700
James Kuszmaul58683ed2020-01-25 20:33:11 -08003@@ -29,6 +29,16 @@ import os
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -07004 import importlib
5 import types
6
7+_base = os.path.dirname(os.path.dirname(__file__))
8+os.environ['GI_TYPELIB_PATH'] = os.path.join(_base, 'usr', 'lib',
9+ 'x86_64-linux-gnu',
10+ 'girepository-1.0')
11+
James Kuszmaul58683ed2020-01-25 20:33:11 -080012+# Tell fontconfig where to find the sandboxed font files.
13+os.environ["FONTCONFIG_PATH"] = os.path.join(_base, "etc/fonts/")
14+os.environ["FONTCONFIG_FILE"] = os.path.join(_base, "etc/fonts/fonts.conf")
15+os.environ["FONTCONFIG_SYSROOT"] = _base
16+
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070017 _static_binding_error = ('When using gi.repository you must not import static '
18 'modules like "gobject". Please change all occurrences '
19 'of "import gobject" to "from gi.repository import GObject". '