depot/third_party/nixpkgs/pkgs/development/libraries/libpeas/fix-paths.patch
Default email 23b612e36f Project import generated by Copybara.
GitOrigin-RevId: ae5c332cbb5827f6b1f02572496b141021de335f
2024-01-25 23:12:00 +09:00

14 lines
654 B
Diff

diff --git a/loaders/python/peas-plugin-loader-python.c b/loaders/python/peas-plugin-loader-python.c
index 26edbf3..0d65ada 100644
--- a/loaders/python/peas-plugin-loader-python.c
+++ b/loaders/python/peas-plugin-loader-python.c
@@ -248,6 +248,9 @@ peas_plugin_loader_python_initialize (PeasPluginLoader *loader)
goto python_init_error;
}
+ /* Add PyGObject to path */
+ PyRun_SimpleString("import site; import functools; functools.reduce(lambda k, p: site.addsitedir(p, k), [@pythonPaths@], site._init_pathinfo())");
+
/* Initialize PyGObject */
pygobject_init (PYGOBJECT_MAJOR_VERSION,
PYGOBJECT_MINOR_VERSION,