Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: dependency_manager/dependency_manager/__init__.py

Issue 2900493002: Add a third_party/ copy of Python's zipfile module (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | dependency_manager/dependency_manager/dependency_manager_util.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import sys 6 import sys
7 7
8 8
9 CATAPULT_PATH = os.path.dirname(os.path.dirname(os.path.dirname( 9 CATAPULT_PATH = os.path.dirname(os.path.dirname(os.path.dirname(
10 os.path.abspath(__file__)))) 10 os.path.abspath(__file__))))
11 CATAPULT_THIRD_PARTY_PATH = os.path.join(CATAPULT_PATH, 'third_party') 11 CATAPULT_THIRD_PARTY_PATH = os.path.join(CATAPULT_PATH, 'third_party')
12 DEPENDENCY_MANAGER_PATH = os.path.join(CATAPULT_PATH, 'dependency_manager') 12 DEPENDENCY_MANAGER_PATH = os.path.join(CATAPULT_PATH, 'dependency_manager')
13 13
14 14
15 def _AddDirToPythonPath(*path_parts): 15 def _AddDirToPythonPath(*path_parts):
16 path = os.path.abspath(os.path.join(*path_parts)) 16 path = os.path.abspath(os.path.join(*path_parts))
17 if os.path.isdir(path) and path not in sys.path: 17 if os.path.isdir(path) and path not in sys.path:
18 sys.path.append(path) 18 sys.path.append(path)
19 19
20 20
21 _AddDirToPythonPath(CATAPULT_PATH, 'common', 'py_utils') 21 _AddDirToPythonPath(CATAPULT_PATH, 'common', 'py_utils')
22 _AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'mock') 22 _AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'mock')
23 _AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'pyfakefs') 23 _AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'pyfakefs')
24 _AddDirToPythonPath(CATAPULT_THIRD_PARTY_PATH, 'zipfile')
24 _AddDirToPythonPath(DEPENDENCY_MANAGER_PATH) 25 _AddDirToPythonPath(DEPENDENCY_MANAGER_PATH)
25 26
26 27
27 # pylint: disable=unused-import 28 # pylint: disable=unused-import
28 from .archive_info import ArchiveInfo 29 from .archive_info import ArchiveInfo
29 from .base_config import BaseConfig 30 from .base_config import BaseConfig
30 from .cloud_storage_info import CloudStorageInfo 31 from .cloud_storage_info import CloudStorageInfo
31 from .dependency_info import DependencyInfo 32 from .dependency_info import DependencyInfo
32 from .exceptions import CloudStorageError 33 from .exceptions import CloudStorageError
33 from .exceptions import CloudStorageUploadConflictError 34 from .exceptions import CloudStorageUploadConflictError
34 from .exceptions import EmptyConfigError 35 from .exceptions import EmptyConfigError
35 from .exceptions import FileNotFoundError 36 from .exceptions import FileNotFoundError
36 from .exceptions import NoPathFoundError 37 from .exceptions import NoPathFoundError
37 from .exceptions import ReadWriteError 38 from .exceptions import ReadWriteError
38 from .exceptions import UnsupportedConfigFormatError 39 from .exceptions import UnsupportedConfigFormatError
39 from .local_path_info import LocalPathInfo 40 from .local_path_info import LocalPathInfo
40 from .manager import DependencyManager 41 from .manager import DependencyManager
41 # pylint: enable=unused-import 42 # pylint: enable=unused-import
42 43
OLDNEW
« no previous file with comments | « no previous file | dependency_manager/dependency_manager/dependency_manager_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698