1# Copyright 2015 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 5import os 6import sys 7 8 9CATAPULT_PATH = os.path.dirname(os.path.dirname(os.path.dirname( 10 os.path.abspath(__file__)))) 11CATAPULT_THIRD_PARTY_PATH = os.path.join(CATAPULT_PATH, 'third_party') 12DEPENDENCY_MANAGER_PATH = os.path.join(CATAPULT_PATH, 'dependency_manager') 13 14 15def _AddDirToPythonPath(*path_parts): 16 path = os.path.abspath(os.path.join(*path_parts)) 17 if os.path.isdir(path) and path not in sys.path: 18 sys.path.append(path) 19 20 21_AddDirToPythonPath(CATAPULT_PATH, 'common', 'py_utils') 22_AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'mock') 23_AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'pyfakefs') 24_AddDirToPythonPath(DEPENDENCY_MANAGER_PATH) 25 26 27# pylint: disable=unused-import 28from .archive_info import ArchiveInfo 29from .base_config import BaseConfig 30from .cloud_storage_info import CloudStorageInfo 31from .dependency_info import DependencyInfo 32from .exceptions import CloudStorageError 33from .exceptions import CloudStorageUploadConflictError 34from .exceptions import EmptyConfigError 35from .exceptions import FileNotFoundError 36from .exceptions import NoPathFoundError 37from .exceptions import ReadWriteError 38from .exceptions import UnsupportedConfigFormatError 39from .local_path_info import LocalPathInfo 40from .manager import DependencyManager 41# pylint: enable=unused-import 42 43