diff options
Diffstat (limited to 'bin')
-rw-r--r-- | 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: |