Brian Silverman | b0ebf1d | 2018-10-17 23:36:40 -0700 | [diff] [blame] | 1 | --- a/__init__.py 1969-12-31 16:00:00.000000000 -0800 |
| 2 | +++ b/__init__.py 2018-10-17 21:45:04.908201161 -0700 |
James Kuszmaul | 58683ed | 2020-01-25 20:33:11 -0800 | [diff] [blame] | 3 | @@ -29,6 +29,16 @@ import os |
Brian Silverman | b0ebf1d | 2018-10-17 23:36:40 -0700 | [diff] [blame] | 4 | 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 Kuszmaul | 58683ed | 2020-01-25 20:33:11 -0800 | [diff] [blame] | 12 | +# 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 Silverman | b0ebf1d | 2018-10-17 23:36:40 -0700 | [diff] [blame] | 17 | _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". ' |