Revert BaseTools: PYTHON3 migration
This reverts commit 6693f359b3c213513c5096a06c6f67244a44dc52..
678f851312
.
Python3 migration is the fundamental change. It requires every developer
to install Python3. Before this migration, the well communication and wide
verification must be done. But now, most people is not aware of this change,
and not try it. So, Python3 migration is reverted and be moved to edk2-staging
Python3 branch for the edk2 user evaluation.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -234,22 +234,22 @@ def GenModuleUNIEncodeFile(ModuleObject, UniFileHeader='', Encoding=DT.TAB_ENCOD
|
||||
if not os.path.exists(os.path.dirname(ModuleObject.GetFullPath())):
|
||||
os.makedirs(os.path.dirname(ModuleObject.GetFullPath()))
|
||||
|
||||
Content = UniFileHeader + '\n'
|
||||
Content += '\n'
|
||||
Content = UniFileHeader + '\r\n'
|
||||
Content += '\r\n'
|
||||
|
||||
Content += FormatUniEntry('#string ' + DT.TAB_INF_ABSTRACT, ModuleObject.GetAbstract(), ContainerFile) + '\n'
|
||||
Content += FormatUniEntry('#string ' + DT.TAB_INF_ABSTRACT, ModuleObject.GetAbstract(), ContainerFile) + '\r\n'
|
||||
|
||||
Content += FormatUniEntry('#string ' + DT.TAB_INF_DESCRIPTION, ModuleObject.GetDescription(), ContainerFile) \
|
||||
+ '\n'
|
||||
+ '\r\n'
|
||||
|
||||
BinaryAbstractString = FormatUniEntry('#string ' + DT.TAB_INF_BINARY_ABSTRACT, BinaryAbstract, ContainerFile)
|
||||
if BinaryAbstractString:
|
||||
Content += BinaryAbstractString + '\n'
|
||||
Content += BinaryAbstractString + '\r\n'
|
||||
|
||||
BinaryDescriptionString = FormatUniEntry('#string ' + DT.TAB_INF_BINARY_DESCRIPTION, BinaryDescription, \
|
||||
ContainerFile)
|
||||
if BinaryDescriptionString:
|
||||
Content += BinaryDescriptionString + '\n'
|
||||
Content += BinaryDescriptionString + '\r\n'
|
||||
|
||||
if not os.path.exists(ContainerFile):
|
||||
File = codecs.open(ContainerFile, 'wb', Encoding)
|
||||
@ -274,7 +274,7 @@ def GenDefines(ModuleObject):
|
||||
if not DefinesDict:
|
||||
continue
|
||||
for Statement in DefinesDict:
|
||||
if len(Statement.split(DT.TAB_EQUAL_SPLIT)) > 1:
|
||||
if Statement.split(DT.TAB_EQUAL_SPLIT) > 1:
|
||||
Statement = (u'%s ' % Statement.split(DT.TAB_EQUAL_SPLIT, 1)[0]).ljust(LeftOffset) \
|
||||
+ u'= %s' % Statement.split(DT.TAB_EQUAL_SPLIT, 1)[1].lstrip()
|
||||
SortedArch = DT.TAB_ARCH_COMMON
|
||||
@ -409,7 +409,7 @@ def GenLibraryClasses(ModuleObject):
|
||||
Statement += '|' + FFE
|
||||
ModuleList = LibraryClass.GetSupModuleList()
|
||||
ArchList = LibraryClass.GetSupArchList()
|
||||
for Index in range(0, len(ArchList)):
|
||||
for Index in xrange(0, len(ArchList)):
|
||||
ArchList[Index] = ConvertArchForInstall(ArchList[Index])
|
||||
ArchList.sort()
|
||||
SortedArch = ' '.join(ArchList)
|
||||
@ -572,7 +572,7 @@ def GenUserExtensions(ModuleObject):
|
||||
# if not Statement:
|
||||
# continue
|
||||
ArchList = UserExtension.GetSupArchList()
|
||||
for Index in range(0, len(ArchList)):
|
||||
for Index in xrange(0, len(ArchList)):
|
||||
ArchList[Index] = ConvertArchForInstall(ArchList[Index])
|
||||
ArchList.sort()
|
||||
KeyList = []
|
||||
|
Reference in New Issue
Block a user