diff options
author | Gary Lin <glin@suse.com> | 2018-07-13 18:18:37 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2018-07-16 11:22:14 +0800 |
commit | 0ff3b52e065cc702a64d5a9016ee7926025dfbc7 (patch) | |
tree | a1bda7fc109da01b33b21615d0373d7e8dbda54e /BaseTools/Source/Python/AutoGen/AutoGen.py | |
parent | 7de0083812245ec2d0b35667ef4a1aa262e006e0 (diff) | |
download | edk2-0ff3b52e065cc702a64d5a9016ee7926025dfbc7.tar.gz edk2-0ff3b52e065cc702a64d5a9016ee7926025dfbc7.tar.bz2 edk2-0ff3b52e065cc702a64d5a9016ee7926025dfbc7.zip |
BaseTools: Use absolute import in AutoGen
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r-- | BaseTools/Source/Python/AutoGen/AutoGen.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py index 289309fff0..c5ab334459 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -16,19 +16,20 @@ ## Import Modules
#
from __future__ import print_function
+from __future__ import absolute_import
import Common.LongFilePathOs as os
import re
import os.path as path
import copy
import uuid
-import GenC
-import GenMake
-import GenDepex
+from . import GenC
+from . import GenMake
+from . import GenDepex
from io import BytesIO
-from StrGather import *
-from BuildEngine import BuildRule
+from .StrGather import *
+from .BuildEngine import BuildRule
from Common.LongFilePathSupport import CopyLongFilePath
from Common.BuildToolError import *
@@ -41,14 +42,14 @@ from CommonDataClass.CommonClass import SkuInfoClass from Workspace.BuildClassObject import *
from GenPatchPcdTable.GenPatchPcdTable import parsePcdInfoFromMapFile
import Common.VpdInfoFile as VpdInfoFile
-from GenPcdDb import CreatePcdDatabaseCode
+from .GenPcdDb import CreatePcdDatabaseCode
from Workspace.MetaFileCommentParser import UsageList
from Workspace.WorkspaceCommon import GetModuleLibInstances
from Common.MultipleWorkspace import MultipleWorkspace as mws
-import InfSectionParser
+from . import InfSectionParser
import datetime
import hashlib
-from GenVar import VariableMgr, var_info
+from .GenVar import VariableMgr, var_info
from collections import OrderedDict
from collections import defaultdict
from Workspace.WorkspaceCommon import OrderedListDict
|