[caribou] Fixed Bug 648350. Use an absolute path to ditermine if caribou is run from build dir.
- From: Jiro Matsuzawa <jmatsuzawa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] Fixed Bug 648350. Use an absolute path to ditermine if caribou is run from build dir.
- Date: Thu, 21 Apr 2011 03:34:49 +0000 (UTC)
commit cf56ea863a972c7c9376a99d29b4294fbcba77df
Author: Jiro Matsuzawa <matsuzawa jr gmail com>
Date: Thu Apr 21 12:27:17 2011 +0900
Fixed Bug 648350. Use an absolute path to ditermine if caribou is run from build dir.
bin/caribou.in | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bin/caribou.in b/bin/caribou.in
index 824c68d..fb31d47 100644
--- a/bin/caribou.in
+++ b/bin/caribou.in
@@ -32,20 +32,20 @@ import os
# We can't rely on prefix if we're installed by relocated RPM. Instead, we
# use __file__ and for now hope that lib is relative to bin.
-sys.prefix = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
+_dirname = os.path.dirname(__file__)
+sys.prefix = os.path.normpath(os.path.join(_dirname, '..'))
libs = os.path.join(sys.prefix, 'lib',
'python PYTHON_VERSION@', 'site-packages')
# point to the proper site-packages path
sys.path.insert(1, libs)
# This might be run from the build dir.
-_dirname = os.path.dirname(__file__)
-if os.path.dirname(__file__) != "@prefix@/bin":
+if os.path.abspath(_dirname) != "@prefix@/bin":
srcdir = os.path.normpath(os.path.join(_dirname, '..'))
sys.path.insert(1, srcdir)
import caribou.common
import caribou.ui
- caribou.data_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
+ caribou.data_path = os.path.abspath(os.path.join(_dirname,
"@top_srcdir@",
"data"))
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]