blob: c84738ac859bc3050692f63eb945125f7898dd69 [file] [log] [blame]
Eric Borenbb0ef0a2014-06-25 11:13:27 -04001#!/usr/bin/env python
2# Copyright (c) 2014 The Chromium Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6
7"""Add the checkout root to sys.path, provide mechanisms for adding others."""
8
9
10import os
11import sys
12
13
14CHECKOUT_ROOT = os.path.realpath(os.path.join(
15 os.path.dirname(os.path.abspath(__file__)), os.pardir))
16
17
18def add_to_pythonpath(path):
19 """Add the given directory to PYTHONPATH."""
20 sys.path.append(path)
21
22
23add_to_pythonpath(CHECKOUT_ROOT)
24