blob: a746a18937727557ab44058e9dc7b3f210fefcd6 [file] [log] [blame]
epoger66ed8dc2014-07-17 12:54:16 -07001#!/usr/bin/python
2
3"""
4Copyright 2014 Google Inc.
5
6Use of this source code is governed by a BSD-style license that can be
7found in the LICENSE file.
8
9Adds possibly-needed directories to PYTHONPATH, if they aren't already there.
10"""
11
12import os
13import sys
14
15TRUNK_DIRECTORY = os.path.abspath(os.path.join(
16 os.path.dirname(__file__), os.pardir, os.pardir))
17for subdir in ['tools']:
18 fullpath = os.path.join(TRUNK_DIRECTORY, subdir)
19 if fullpath not in sys.path:
20 sys.path.append(fullpath)