PageRenderTime 439ms CodeModel.GetById 171ms app.highlight 2ms RepoModel.GetById 103ms app.codeStats 162ms

/scripts/setup-path.py

https://bitbucket.org/lindenlab/viewer-beta/
Python | 38 lines | 22 code | 5 blank | 11 comment | 5 complexity | eb25d5663e630474b5c2e53b04c7f62f MD5 | raw file
 1#!/usr/bin/env python
 2"""\
 3@file setup-path.py
 4@brief Get the python library directory in the path, so we don't have
 5to screw with PYTHONPATH or symbolic links.
 6
 7$LicenseInfo:firstyear=2007&license=viewerlgpl$
 8Second Life Viewer Source Code
 9Copyright (C) 2010, Linden Research, Inc.
10
11This library is free software; you can redistribute it and/or
12modify it under the terms of the GNU Lesser General Public
13License as published by the Free Software Foundation;
14version 2.1 of the License only.
15
16This library is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19Lesser General Public License for more details.
20
21You should have received a copy of the GNU Lesser General Public
22License along with this library; if not, write to the Free Software
23Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24
25Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
26$/LicenseInfo$
27"""
28
29import sys
30from os.path import realpath, dirname, join
31
32# Walk back to checkout base directory
33dir = dirname(dirname(realpath(__file__)))
34# Walk in to libraries directory
35dir = join(dir, 'indra', 'lib', 'python')
36
37if dir not in sys.path:
38    sys.path.insert(0, dir)