If GI_TYPELIB_PATH environmental variable is set externally before GIMP 2.99 is started, python doesn't work
If GI_TYPELIB_PATH environmental variable is set externally before GIMP 2.99 is started, python doesn't work because something adds a similar path, but using the wrong separator for Windows. I was able to verify this by getting the python script to output it's environment using the following at the start of a python script:
import os
print(os.environ)
If I set GI_TYPELIB_PATH to C:\msys64\home\michael.mclaughlin\gimp\_install-w64/lib/girepository-1.0/
Then python reports:
'GI_TYPELIB_PATH': 'C:\\msys64\\home\\michael.mclaughlin\\gimp\\_install-w64/lib/girepository-1.0/:C:/msys64/home/michael.mclaughlin/gimp/_install-w64/lib/girepository-1.0/'
Notice that the path separator is a ":" where it should be a ";" for Windows.
If I set GI_TYPELIB_PATH to "" everything works fine and python reports:
'GI_TYPELIB_PATH': 'C:\\msys64\\home\\michael.mclaughlin\\gimp\\_install-w64/lib/girepository-1.0/'
So something is helpfully setting up GI_TYPELIB_PATH but if it's already set, it adds the same thing on again but with the incorrect separator.