summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJiro Matsuzawa <matsuzawa.jr@gmail.com>2011-04-21 12:27:17 +0900
committerJiro Matsuzawa <matsuzawa.jr@gmail.com>2011-04-21 12:27:17 +0900
commitcf56ea863a972c7c9376a99d29b4294fbcba77df (patch)
tree65ed9ca6beca1c6c0b31039719f84d010f196edd /bin
parent20ad074173d11c03518ff294aa54989893b843e0 (diff)
downloadcaribou-cf56ea863a972c7c9376a99d29b4294fbcba77df.tar.gz
Fixed Bug 648350. Use an absolute path to ditermine if caribou is run from build dir.
Diffstat (limited to 'bin')
-rw-r--r--bin/caribou.in8
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: