| OLD | NEW |
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 """This module contains util functions that local scripts can use.""" |
| 6 |
| 7 import os |
| 8 import sys |
| 9 |
| 10 |
| 11 def SetUpSystemPaths(): |
| 12 """Sets system paths so as to import modules in findit, third_party and |
| 13 appengine.""" |
| 14 findit_root_dir = os.path.join(os.path.dirname(__file__), os.path.pardir) |
| 15 third_party_dir = os.path.join(findit_root_dir, 'third_party') |
| 16 appengine_sdk_dir = os.path.join(findit_root_dir, os.path.pardir, |
| 17 os.path.pardir, os.path.pardir, |
| 18 'google_appengine') |
| 19 |
| 20 # Add App Engine SDK dir to sys.path. |
| 21 sys.path.insert(1, appengine_sdk_dir) |
| 22 sys.path.insert(1, third_party_dir) |
| 23 import dev_appserver |
| 24 dev_appserver.fix_sys_path() |
| 25 |
| 26 # Add Findit root dir to sys.path so that modules in Findit is available. |
| 27 sys.path.insert(1, findit_root_dir) |
| OLD | NEW |