diff options
author | Carsey, Jaben <jaben.carsey@intel.com> | 2019-01-10 03:00:41 +0800 |
---|---|---|
committer | BobCF <bob.c.feng@intel.com> | 2019-01-10 22:01:11 +0800 |
commit | 938cf4c33a0695ef1011b07e455a7ec2f87b5ad3 (patch) | |
tree | 54d533d009cb2e8952608eefe2baf6200971d2b1 /BaseTools/Source/Python/AutoGen | |
parent | a53a888de8f5fa8dbf75a381e28f25a5497572f1 (diff) | |
download | edk2-938cf4c33a0695ef1011b07e455a7ec2f87b5ad3.tar.gz edk2-938cf4c33a0695ef1011b07e455a7ec2f87b5ad3.tar.bz2 edk2-938cf4c33a0695ef1011b07e455a7ec2f87b5ad3.zip |
BaseTools: fix imports
1 - Some of these imports are cascaded from another file. Import them locally.
2 - Some of these imports are not used. Remove them.
3 - Some of these were missing the namespace used to import them.
These changes facilitate optimization of BaseTools:
https://bugzilla.tianocore.org/show_bug.cgi?id=42
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 6 | ||||
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenC.py | 2 | ||||
-rw-r--r-- | BaseTools/Source/Python/AutoGen/GenPcdDb.py | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index d646cd50ce..acd34692b6 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -1,7 +1,7 @@ ## @file
# Generate AutoGen.h, AutoGen.c and *.depex files
#
-# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2018, Hewlett Packard Enterprise Development, L.P.<BR>
#
# This program and the accompanying materials
@@ -52,6 +52,7 @@ from .GenVar import VariableMgr, var_info from collections import OrderedDict
from collections import defaultdict
from Workspace.WorkspaceCommon import OrderedListDict
+from Common.ToolDefClassObject import gDefaultToolsDefFile
from Common.caching import cached_property, cached_class_function
@@ -85,9 +86,6 @@ gMakeTypeMap = {TAB_COMPILER_MSFT:"nmake", "GCC":"gmake"} ## Build rule configuration file
gDefaultBuildRuleFile = 'build_rule.txt'
-## Tools definition configuration file
-gDefaultToolsDefFile = 'tools_def.txt'
-
## Build rule default version
AutoGenReqBuildRuleVerNum = "0.1"
diff --git a/BaseTools/Source/Python/AutoGen/GenC.py b/BaseTools/Source/Python/AutoGen/GenC.py index 09626d0b96..e224568db1 100644 --- a/BaseTools/Source/Python/AutoGen/GenC.py +++ b/BaseTools/Source/Python/AutoGen/GenC.py @@ -18,7 +18,7 @@ import string import collections
import struct
from Common import EdkLogger
-
+from Common import GlobalData
from Common.BuildToolError import *
from Common.DataType import *
from Common.Misc import *
diff --git a/BaseTools/Source/Python/AutoGen/GenPcdDb.py b/BaseTools/Source/Python/AutoGen/GenPcdDb.py index 876fcf1efb..a9068d2d7a 100644 --- a/BaseTools/Source/Python/AutoGen/GenPcdDb.py +++ b/BaseTools/Source/Python/AutoGen/GenPcdDb.py @@ -22,6 +22,9 @@ from Common.VariableAttributes import VariableAttributes import copy
from struct import unpack
from Common.DataType import *
+from Common import GlobalData
+from Common import EdkLogger
+import Common.LongFilePathOs as os
DATABASE_VERSION = 7
|