[meld] conf: Attempt to support installed use



commit 32e988daa88455ed8fde69d383da67a77de3804b
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Fri Nov 8 06:17:44 2013 +1000

    conf: Attempt to support installed use

 meld/conf.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/meld/conf.py b/meld/conf.py
index 5eb3660..18dd6b4 100644
--- a/meld/conf.py
+++ b/meld/conf.py
@@ -1,11 +1,12 @@
 
 import os
+import sys
 
 __package__ = "meld"
 __version__ = "3.11.0"
 
-DATADIR = None
-LOCALEDIR = None
+DATADIR = os.path.join(sys.prefix, "share", "meld")
+LOCALEDIR = os.path.join(sys.prefix, "share", "locale")
 
 
 def uninstalled():
@@ -13,8 +14,8 @@ def uninstalled():
     melddir = os.path.abspath(os.path.join(
         os.path.dirname(os.path.realpath(__file__)), ".."))
 
-    DATADIR = DATADIR or os.path.join(melddir, "data")
-    LOCALEDIR = LOCALEDIR or os.path.join(melddir, "build", "mo")
+    DATADIR = os.path.join(melddir, "data")
+    LOCALEDIR = os.path.join(melddir, "build", "mo")
 
     # This first bit should be unnecessary, but some things (GTK icon theme
     # location, GSettings schema location) don't fall back correctly.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]