[meld] Move meld to bin/ and adjust python path for uninstalled case
- From: Kai Willadsen <kaiw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [meld] Move meld to bin/ and adjust python path for uninstalled case
- Date: Sun, 13 Sep 2009 07:43:16 +0000 (UTC)
commit 71c357202e6ea92d8ce97c3ffa6fcb86a6fd027d
Author: Kai Willadsen <kai willadsen gmail com>
Date: Wed Aug 19 13:13:52 2009 +1000
Move meld to bin/ and adjust python path for uninstalled case
GNUmakefile | 4 ++--
meld => bin/meld | 15 +++++++++++----
2 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/GNUmakefile b/GNUmakefile
index b56d02c..44465e4 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -10,7 +10,7 @@ RELEASE := meld-$(VERSION)
MELD_CMD := ./meld #--profile
TESTNUM := 1
DEVELOPER := 0
-SPECIALS := meld paths.py
+SPECIALS := bin/meld paths.py
BROWSER := firefox
ifeq ($(DEVELOPER), 1)
@@ -45,7 +45,7 @@ install: $(addsuffix .install,$(SPECIALS)) meld.desktop
$(DESTDIR)$(sharedir)/applications \
$(DESTDIR)$(sharedir)/pixmaps \
$(DESTDIR)$(helpdir_)
- install -m 755 meld.install \
+ install -m 755 bin/meld.install \
$(DESTDIR)$(bindir)/meld
install -m 644 *.py \
$(DESTDIR)$(libdir_)
diff --git a/meld b/bin/meld
similarity index 91%
rename from meld
rename to bin/meld
index 76dce5e..2339b2c 100755
--- a/meld
+++ b/bin/meld
@@ -19,6 +19,7 @@
#
# pychecker
#
+import os
import sys
if "--pychecker" in sys.argv:
sys.argv.remove("--pychecker")
@@ -26,11 +27,17 @@ if "--pychecker" in sys.argv:
os.environ['PYCHECKER'] = "--no-argsused --no-classattr --stdlib"
#'--blacklist=gettext,locale,pygtk,gtk,gtk.keysyms,popen2,random,difflib,filecmp,tempfile'
import pychecker.checker
-#
+
+# Support running from an uninstalled version
+melddir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
+if os.path.exists(os.path.join(melddir, "meld.doap")):
+ sys.path[0:0] = [melddir]
+else:
+ sys.path[0:0] = [ #LIBDIR#
+ ]
+
# i18n support
-#
-sys.path[0:0] = [ #LIBDIR#
-]
+
import paths
import gettext
_ = gettext.gettext
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]