2014-06-05 17:30:37 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
"""
|
|
|
|
Copyright 2014 Google Inc.
|
|
|
|
|
|
|
|
Use of this source code is governed by a BSD-style license that can be
|
|
|
|
found in the LICENSE file.
|
|
|
|
|
2014-07-11 15:52:35 +00:00
|
|
|
Adds possibly-needed directories to PYTHONPATH, if they aren't already there.
|
2014-06-05 17:30:37 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2014-07-11 15:52:35 +00:00
|
|
|
TRUNK_DIRECTORY = os.path.abspath(os.path.join(
|
|
|
|
os.path.dirname(__file__), os.pardir, os.pardir))
|
|
|
|
for subdir in ['common', 'gm', 'tools']:
|
|
|
|
fullpath = os.path.join(TRUNK_DIRECTORY, subdir)
|
|
|
|
if fullpath not in sys.path:
|
|
|
|
sys.path.append(fullpath)
|