From cf56ea863a972c7c9376a99d29b4294fbcba77df Mon Sep 17 00:00:00 2001 From: Jiro Matsuzawa Date: Thu, 21 Apr 2011 12:27:17 +0900 Subject: Fixed Bug 648350. Use an absolute path to ditermine if caribou is run from build dir. --- bin/caribou.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bin') 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: -- cgit v1.2.1