BaseTools: Use absolute import in Workspace

Based on "futurize -f libfuturize.fixes.fix_absolute_import

Contributed-under: TianoCore Contribution Agreement 1.1
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
Gary Lin 2018-07-13 18:18:46 +08:00 committed by Yonghong Zhu
parent ac10741648
commit 1100bc5aa0
6 changed files with 19 additions and 13 deletions

View File

@ -18,6 +18,7 @@
# into PlatformBuildClassObject form for easier use for AutoGen.
#
from __future__ import print_function
from __future__ import absolute_import
from Common.StringUtils import *
from Common.DataType import *
from Common.Misc import *
@ -26,11 +27,11 @@ from Common.Expression import *
from CommonDataClass.CommonClass import SkuInfoClass
from Common.TargetTxtClassObject import *
from Common.ToolDefClassObject import *
from MetaDataTable import *
from MetaFileTable import *
from MetaFileParser import *
from .MetaDataTable import *
from .MetaFileTable import *
from .MetaFileParser import *
from WorkspaceCommon import GetDeclaredPcd
from .WorkspaceCommon import GetDeclaredPcd
from Common.Misc import AnalyzeDscPcd
from Common.Misc import ProcessDuplicatedInf
import re

View File

@ -12,11 +12,12 @@
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
from __future__ import absolute_import
from Common.StringUtils import *
from Common.DataType import *
from Common.Misc import *
from types import *
from MetaFileParser import *
from .MetaFileParser import *
from collections import OrderedDict
from Workspace.BuildClassObject import ModuleBuildClassObject, LibraryClassObject, PcdClassObject

View File

@ -16,6 +16,7 @@
# Import Modules
#
from __future__ import print_function
from __future__ import absolute_import
import Common.LongFilePathOs as os
import re
import time
@ -33,8 +34,8 @@ from Common.Expression import *
from CommonDataClass.Exceptions import *
from Common.LongFilePathSupport import OpenLongFilePath as open
from collections import defaultdict
from MetaFileTable import MetaFileStorage
from MetaFileCommentParser import CheckInfComment
from .MetaFileTable import MetaFileStorage
from .MetaFileCommentParser import CheckInfComment
## RegEx for finding file versions
hexVersionPattern = re.compile(r'0[xX][\da-f-A-F]{5,8}')

View File

@ -14,13 +14,14 @@
##
# Import Modules
#
from __future__ import absolute_import
import uuid
import Common.EdkLogger as EdkLogger
from Common.BuildToolError import FORMAT_INVALID
from MetaDataTable import Table, TableFile
from MetaDataTable import ConvertToSqlString
from .MetaDataTable import Table, TableFile
from .MetaDataTable import ConvertToSqlString
from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE_INF, \
MODEL_FILE_OTHERS
from Common.DataType import *

View File

@ -11,9 +11,10 @@
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
from __future__ import absolute_import
from collections import OrderedDict, defaultdict
from Common.DataType import SUP_MODULE_USER_DEFINED
from BuildClassObject import LibraryClassObject
from .BuildClassObject import LibraryClassObject
import Common.GlobalData as GlobalData
from Workspace.BuildClassObject import StructurePcd
from Common.BuildToolError import RESOURCE_NOT_AVAILABLE

View File

@ -15,15 +15,16 @@
##
# Import Modules
#
from __future__ import absolute_import
import sqlite3
from Common.StringUtils import *
from Common.DataType import *
from Common.Misc import *
from types import *
from MetaDataTable import *
from MetaFileTable import *
from MetaFileParser import *
from .MetaDataTable import *
from .MetaFileTable import *
from .MetaFileParser import *
from Workspace.DecBuildData import DecBuildData
from Workspace.DscBuildData import DscBuildData