BaseTools: Use absolute import in Ecc
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:
@ -1,6 +1,7 @@
|
|||||||
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
|
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
from antlr3 import *
|
from antlr3 import *
|
||||||
from antlr3.compat import set, frozenset
|
from antlr3.compat import set, frozenset
|
||||||
|
|
||||||
@ -23,8 +24,8 @@ from antlr3.compat import set, frozenset
|
|||||||
#
|
#
|
||||||
##
|
##
|
||||||
|
|
||||||
import CodeFragment
|
from . import CodeFragment
|
||||||
import FileProfile
|
from . import FileProfile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,14 +10,15 @@
|
|||||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
import Common.DataType as DT
|
import Common.DataType as DT
|
||||||
from EccToolError import *
|
from .EccToolError import *
|
||||||
from MetaDataParser import ParseHeaderCommentSection
|
from .MetaDataParser import ParseHeaderCommentSection
|
||||||
import EccGlobalData
|
from . import EccGlobalData
|
||||||
import c
|
from . import c
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
|
|
||||||
|
@ -17,18 +17,19 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
import re
|
import re
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import antlr3
|
import antlr3
|
||||||
from CLexer import CLexer
|
from .CLexer import CLexer
|
||||||
from CParser import CParser
|
from .CParser import CParser
|
||||||
|
|
||||||
import FileProfile
|
from . import FileProfile
|
||||||
from CodeFragment import Comment
|
from .CodeFragment import Comment
|
||||||
from CodeFragment import PP_Directive
|
from .CodeFragment import PP_Directive
|
||||||
from ParserWarning import Warning
|
from .ParserWarning import Warning
|
||||||
|
|
||||||
|
|
||||||
##define T_CHAR_SPACE ' '
|
##define T_CHAR_SPACE ' '
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import Common.LongFilePathOs as os, time
|
import Common.LongFilePathOs as os, time
|
||||||
|
|
||||||
@ -26,9 +27,9 @@ from Table.TableFunction import TableFunction
|
|||||||
from Table.TablePcd import TablePcd
|
from Table.TablePcd import TablePcd
|
||||||
from Table.TableIdentifier import TableIdentifier
|
from Table.TableIdentifier import TableIdentifier
|
||||||
from Table.TableReport import TableReport
|
from Table.TableReport import TableReport
|
||||||
from MetaFileWorkspace.MetaFileTable import ModuleTable
|
from .MetaFileWorkspace.MetaFileTable import ModuleTable
|
||||||
from MetaFileWorkspace.MetaFileTable import PackageTable
|
from .MetaFileWorkspace.MetaFileTable import PackageTable
|
||||||
from MetaFileWorkspace.MetaFileTable import PlatformTable
|
from .MetaFileWorkspace.MetaFileTable import PlatformTable
|
||||||
from Table.TableFdf import TableFdf
|
from Table.TableFdf import TableFdf
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -14,14 +14,15 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import Common.LongFilePathOs as os, time, glob, sys
|
import Common.LongFilePathOs as os, time, glob, sys
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import Database
|
from . import Database
|
||||||
import EccGlobalData
|
from . import EccGlobalData
|
||||||
from MetaDataParser import *
|
from .MetaDataParser import *
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from Configuration import Configuration
|
from .Configuration import Configuration
|
||||||
from Check import Check
|
from .Check import Check
|
||||||
import Common.GlobalData as GlobalData
|
import Common.GlobalData as GlobalData
|
||||||
|
|
||||||
from Common.StringUtils import NormPath
|
from Common.StringUtils import NormPath
|
||||||
@ -29,14 +30,14 @@ from Common.BuildVersion import gBUILD_VERSION
|
|||||||
from Common import BuildToolError
|
from Common import BuildToolError
|
||||||
from Common.Misc import PathClass
|
from Common.Misc import PathClass
|
||||||
from Common.Misc import DirCache
|
from Common.Misc import DirCache
|
||||||
from MetaFileWorkspace.MetaFileParser import DscParser
|
from .MetaFileWorkspace.MetaFileParser import DscParser
|
||||||
from MetaFileWorkspace.MetaFileParser import DecParser
|
from .MetaFileWorkspace.MetaFileParser import DecParser
|
||||||
from MetaFileWorkspace.MetaFileParser import InfParser
|
from .MetaFileWorkspace.MetaFileParser import InfParser
|
||||||
from MetaFileWorkspace.MetaFileParser import Fdf
|
from .MetaFileWorkspace.MetaFileParser import Fdf
|
||||||
from MetaFileWorkspace.MetaFileTable import MetaFileStorage
|
from .MetaFileWorkspace.MetaFileTable import MetaFileStorage
|
||||||
import c
|
from . import c
|
||||||
import re, string
|
import re, string
|
||||||
from Exception import *
|
from .Exception import *
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from Xml.XmlRoutines import *
|
from __future__ import absolute_import
|
||||||
|
from .Xml.XmlRoutines import *
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
|
|
||||||
# ExceptionXml to parse Exception Node of XML file
|
# ExceptionXml to parse Exception Node of XML file
|
||||||
|
@ -16,9 +16,10 @@
|
|||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
import re
|
import re
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from ParserWarning import Warning
|
from .ParserWarning import Warning
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
|
|
||||||
CommentList = []
|
CommentList = []
|
||||||
@ -54,5 +55,3 @@ class FileProfile :
|
|||||||
|
|
||||||
except IOError:
|
except IOError:
|
||||||
raise Warning("Error when opening file %s" % FileName)
|
raise Warning("Error when opening file %s" % FileName)
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,11 +11,12 @@
|
|||||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
from CommonDataClass.DataClass import *
|
from CommonDataClass.DataClass import *
|
||||||
from EccToolError import *
|
from .EccToolError import *
|
||||||
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
from Common.MultipleWorkspace import MultipleWorkspace as mws
|
||||||
import EccGlobalData
|
from . import EccGlobalData
|
||||||
import re
|
import re
|
||||||
## Get the inlcude path list for a source file
|
## Get the inlcude path list for a source file
|
||||||
#
|
#
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
@ -31,7 +32,7 @@ from Common.Misc import GuidStructureStringToGuidString, CheckPcdDatum, PathClas
|
|||||||
from Common.Expression import *
|
from Common.Expression import *
|
||||||
from CommonDataClass.Exceptions import *
|
from CommonDataClass.Exceptions import *
|
||||||
|
|
||||||
from MetaFileTable import MetaFileStorage
|
from .MetaFileTable import MetaFileStorage
|
||||||
from GenFds.FdfParser import FdfParser
|
from GenFds.FdfParser import FdfParser
|
||||||
from Common.LongFilePathSupport import OpenLongFilePath as open
|
from Common.LongFilePathSupport import OpenLongFilePath as open
|
||||||
from Common.LongFilePathSupport import CodecOpenLongFilePath
|
from Common.LongFilePathSupport import CodecOpenLongFilePath
|
||||||
|
@ -14,13 +14,14 @@
|
|||||||
##
|
##
|
||||||
# Import Modules
|
# Import Modules
|
||||||
#
|
#
|
||||||
|
from __future__ import absolute_import
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
import Common.EdkLogger as EdkLogger
|
import Common.EdkLogger as EdkLogger
|
||||||
import EccGlobalData
|
import EccGlobalData
|
||||||
|
|
||||||
from MetaDataTable import Table
|
from .MetaDataTable import Table
|
||||||
from MetaDataTable import ConvertToSqlString
|
from .MetaDataTable import ConvertToSqlString
|
||||||
from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE_INF, \
|
from CommonDataClass.DataClass import MODEL_FILE_DSC, MODEL_FILE_DEC, MODEL_FILE_INF, \
|
||||||
MODEL_FILE_OTHERS
|
MODEL_FILE_OTHERS
|
||||||
|
|
||||||
|
@ -12,18 +12,19 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
import sys
|
import sys
|
||||||
import Common.LongFilePathOs as os
|
import Common.LongFilePathOs as os
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
import CodeFragmentCollector
|
from . import CodeFragmentCollector
|
||||||
import FileProfile
|
from . import FileProfile
|
||||||
from CommonDataClass import DataClass
|
from CommonDataClass import DataClass
|
||||||
import Database
|
from . import Database
|
||||||
from Common import EdkLogger
|
from Common import EdkLogger
|
||||||
from EccToolError import *
|
from .EccToolError import *
|
||||||
import EccGlobalData
|
from . import EccGlobalData
|
||||||
import MetaDataParser
|
from . import MetaDataParser
|
||||||
|
|
||||||
IncludeFileListDict = {}
|
IncludeFileListDict = {}
|
||||||
AllIncludeFileListDict = {}
|
AllIncludeFileListDict = {}
|
||||||
|
Reference in New Issue
Block a user