depot/third_party/nixpkgs/pkgs/desktops/gnome/misc/nautilus-python/fix-paths.patch
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

14 lines
513 B
Diff

diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index 843e3c6..466a513 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -184,6 +184,9 @@ nautilus_python_init_python (void) {
return FALSE;
}
+ debug("Add PyGObject to path");
+ PyRun_SimpleString("import site;import functools; functools.reduce(lambda k, p: site.addsitedir(p, k), [@pythonPaths@], site._init_pathinfo())");
+
/* import gobject */
debug("init_pygobject");
if (!np_init_pygobject()) {