35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From b51b63b78c9ff1639f5f65ccfdd54681f1cadc1d Mon Sep 17 00:00:00 2001
|
|
From: Sam Parkinson <sam@sam.today>
|
|
Date: Tue, 26 Dec 2017 14:46:27 +1100
|
|
Subject: [PATCH] Extend the python path; rather than replacing it
|
|
|
|
Some distros (i.e. NixOS) require the special PYTHONPATH, so that
|
|
the web extension has access to the python packages it wants (i.e. gi).
|
|
|
|
Previously, the PYTHONPATH was replaced with the web extension path;
|
|
meaning it would crash on NixOS. This instead prepends the web
|
|
extension path to the PYTHONPATH.
|
|
---
|
|
eolie/application.py | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/eolie/application.py b/eolie/application.py
|
|
index 3c21542..bed4e55 100644
|
|
--- a/eolie/application.py
|
|
+++ b/eolie/application.py
|
|
@@ -340,7 +340,11 @@ class Application(Gtk.Application):
|
|
self.settings = Settings.new()
|
|
|
|
# Init extensions
|
|
- GLib.setenv("PYTHONPATH", self.__extension_dir, True)
|
|
+ current_path = GLib.getenv("PYTHONPATH")
|
|
+ new_path = self.__extension_dir
|
|
+ if current_path:
|
|
+ new_path = new_path + ':' + current_path
|
|
+ GLib.setenv("PYTHONPATH", new_path, True)
|
|
|
|
# Create favicon path
|
|
if not GLib.file_test(self.__FAVICONS_PATH, GLib.FileTest.IS_DIR):
|
|
--
|
|
2.15.0
|
|
|