From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id F2EA9209884D2 for ; Fri, 13 Jul 2018 08:07:58 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2018 08:07:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,347,1526367600"; d="scan'208";a="72500286" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 13 Jul 2018 08:07:02 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 13 Jul 2018 08:07:02 -0700 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.106]) by fmsmsx111.amr.corp.intel.com ([169.254.12.66]) with mapi id 14.03.0319.002; Fri, 13 Jul 2018 08:07:01 -0700 From: "Carsey, Jaben" To: Gary Lin , "edk2-devel@lists.01.org" CC: "Gao, Liming" Thread-Topic: [edk2] [PATCH v2 00/16] BaseTools: Adopt absolute import Thread-Index: AQHUGpL5jIxwcdDQAE+9FPH/BNhWeaSNQRfQ Date: Fri, 13 Jul 2018 15:07:00 +0000 Message-ID: References: <20180713101847.7485-1-glin@suse.com> In-Reply-To: <20180713101847.7485-1-glin@suse.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzkyNGQ4ZTAtMjY5MS00N2EyLTg4MjEtOGZjMjAyODM3NGIzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiQ2RxamJtNHE3ZnR0U2dcL3lyZ1ExS0o1QWR5Tk5HXC94ajFkR0pDNTJoa0JXSTlcL0pxNzJKUkdEK2Z1V1RQMUJRMCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [PATCH v2 00/16] BaseTools: Adopt absolute import X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2018 15:07:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Nice. Reviewed-by: Jaben Carsey > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Gary Lin > Sent: Friday, July 13, 2018 3:19 AM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [edk2] [PATCH v2 00/16] BaseTools: Adopt absolute import >=20 > v2: > Treat BPDG and Ecc as python modules since they use the modules in > its own directory >=20 > This patch series is based on "libfuturize.fixes.fix_absolute_import" > to adopt abolute import since relative import is not allowed in python3. >=20 > The command is applied to BaseTools modules individually. Most of the > patches are straightforward except the GenFds patches. It's because > there are several circular imports in GenFds and circular import is not > compatible with absolute import. To make the patches bisectable, I delay > the import of some modules in the first GenFds patch and refactor the > code in the follow-up patches to remove circular import completely. >=20 > The patch set is also available in my github branch: >=20 > https://github.com/lcp/edk2/tree/python3-absolute-import-v2 >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Cc: Yonghong Zhu > Cc: Liming Gao > Signed-off-by: Gary Lin >=20 > Gary Lin (16): > BaseTools: Treat GenFds.py as a python module > BaseTools: Use absolute import in GenFds > BaseTools: Move OverrideAttribs to OptRomInfStatement.py > BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py > BaseTools: Move ImageBinDict to GenFdsGlobalVariable.py > BaseTools: Use absolute import in AutoGen > BaseTools: Treat BPDG.py as a python module > BaseTools: Use absolute import in BPDG > BaseTools: Use absolute import in Common > BaseTools: Treat Ecc.py as a python module > BaseTools: Use absolute import in Ecc > BaseTools: Use absolute import in Eot > BaseTools: Use absolute import in Table > BaseTools: Use absolute import in UPT > BaseTools: Use absolute import in Workspace > BaseTools: Use absolute import in Scripts >=20 > BaseTools/BinWrappers/PosixLike/BPDG | 2 +- > BaseTools/BinWrappers/PosixLike/Ecc | 2 +- > BaseTools/BinWrappers/PosixLike/GenFds | 2 +- > BaseTools/BinWrappers/WindowsLike/BPDG.bat | 3 +- > BaseTools/BinWrappers/WindowsLike/Ecc.bat | 3 +- > BaseTools/BinWrappers/WindowsLike/GenFds.bat | 3 +- > .../plugins/EdkPlugins/basemodel/doxygen.py | 3 +- > .../plugins/EdkPlugins/basemodel/ini.py | 3 +- > BaseTools/Source/Python/AutoGen/AutoGen.py | 17 +-- > BaseTools/Source/Python/AutoGen/GenC.py | 7 +- > BaseTools/Source/Python/AutoGen/GenMake.py | 3 +- > BaseTools/Source/Python/AutoGen/GenPcdDb.py | 7 +- > .../Source/Python/AutoGen/IdfClassObject.py | 3 +- > BaseTools/Source/Python/AutoGen/StrGather.py | 3 +- > BaseTools/Source/Python/BPDG/BPDG.py | 5 +- > BaseTools/Source/Python/BPDG/GenVpd.py | 3 +- > BaseTools/Source/Python/Common/Database.py | 8 +- > BaseTools/Source/Python/Common/EdkLogger.py | 3 +- > BaseTools/Source/Python/Common/Expression.py | 3 +- > .../Source/Python/Common/LongFilePathOs.py | 3 +- > BaseTools/Source/Python/Common/Misc.py | 9 +- > BaseTools/Source/Python/Common/Parsing.py | 5 +- > BaseTools/Source/Python/Common/StringUtils.py | 9 +- > .../Python/Common/TargetTxtClassObject.py | 9 +- > .../Python/Common/ToolDefClassObject.py | 9 +- > BaseTools/Source/Python/Ecc/CParser.py | 5 +- > BaseTools/Source/Python/Ecc/Check.py | 9 +- > .../Python/Ecc/CodeFragmentCollector.py | 13 ++- > BaseTools/Source/Python/Ecc/Database.py | 7 +- > BaseTools/Source/Python/Ecc/Ecc.py | 25 +++-- > BaseTools/Source/Python/Ecc/Exception.py | 3 +- > BaseTools/Source/Python/Ecc/FileProfile.py | 5 +- > BaseTools/Source/Python/Ecc/MetaDataParser.py | 5 +- > .../Ecc/MetaFileWorkspace/MetaFileParser.py | 3 +- > .../Ecc/MetaFileWorkspace/MetaFileTable.py | 5 +- > BaseTools/Source/Python/Ecc/c.py | 13 ++- > BaseTools/Source/Python/Eot/CParser.py | 5 +- > .../Python/Eot/CodeFragmentCollector.py | 11 +- > BaseTools/Source/Python/Eot/Eot.py | 21 ++-- > BaseTools/Source/Python/Eot/FileProfile.py | 3 +- > BaseTools/Source/Python/Eot/InfParserLite.py | 5 +- > BaseTools/Source/Python/Eot/Parser.py | 3 +- > BaseTools/Source/Python/Eot/Report.py | 3 +- > BaseTools/Source/Python/Eot/c.py | 9 +- > .../Source/Python/GenFds/AprioriSection.py | 5 +- > BaseTools/Source/Python/GenFds/Capsule.py | 12 +- > BaseTools/Source/Python/GenFds/CapsuleData.py | 5 +- > .../Source/Python/GenFds/CompressSection.py | 7 +- > BaseTools/Source/Python/GenFds/DataSection.py | 7 +- > .../Source/Python/GenFds/DepexSection.py | 7 +- > BaseTools/Source/Python/GenFds/EfiSection.py | 7 +- > BaseTools/Source/Python/GenFds/Fd.py | 22 ++-- > BaseTools/Source/Python/GenFds/FdfParser.py | 57 +++++----- > .../Source/Python/GenFds/FfsFileStatement.py | 11 +- > .../Source/Python/GenFds/FfsInfStatement.py | 19 ++-- > BaseTools/Source/Python/GenFds/Fv.py | 20 ++-- > .../Source/Python/GenFds/FvImageSection.py | 7 +- > BaseTools/Source/Python/GenFds/GenFds.py | 105 +----------------- > .../Python/GenFds/GenFdsGlobalVariable.py | 97 +++++++++++++++- > BaseTools/Source/Python/GenFds/GuidSection.py | 11 +- > .../Python/GenFds/OptRomFileStatement.py | 3 +- > .../Python/GenFds/OptRomInfStatement.py | 27 +++-- > BaseTools/Source/Python/GenFds/OptionRom.py | 6 +- > BaseTools/Source/Python/GenFds/Region.py | 3 +- > .../Source/Python/GenFds/RuleComplexFile.py | 3 +- > .../Source/Python/GenFds/RuleSimpleFile.py | 3 +- > BaseTools/Source/Python/GenFds/Section.py | 3 +- > BaseTools/Source/Python/GenFds/UiSection.py | 7 +- > BaseTools/Source/Python/GenFds/VerSection.py | 7 +- > BaseTools/Source/Python/GenFds/Vtf.py | 3 +- > .../Source/Python/Table/TableDataModel.py | 3 +- > BaseTools/Source/Python/Table/TableDec.py | 3 +- > BaseTools/Source/Python/Table/TableDsc.py | 3 +- > .../Source/Python/Table/TableEotReport.py | 3 +- > BaseTools/Source/Python/Table/TableFdf.py | 3 +- > BaseTools/Source/Python/Table/TableFile.py | 3 +- > .../Source/Python/Table/TableFunction.py | 3 +- > .../Source/Python/Table/TableIdentifier.py | 3 +- > BaseTools/Source/Python/Table/TableInf.py | 3 +- > BaseTools/Source/Python/Table/TablePcd.py | 3 +- > BaseTools/Source/Python/Table/TableQuery.py | 3 +- > BaseTools/Source/Python/Table/TableReport.py | 3 +- > .../Source/Python/UPT/Library/Parsing.py | 3 +- > .../Source/Python/Workspace/DscBuildData.py | 9 +- > .../Source/Python/Workspace/InfBuildData.py | 3 +- > .../Source/Python/Workspace/MetaFileParser.py | 5 +- > .../Source/Python/Workspace/MetaFileTable.py | 5 +- > .../Python/Workspace/WorkspaceCommon.py | 3 +- > .../Python/Workspace/WorkspaceDatabase.py | 7 +- > 89 files changed, 452 insertions(+), 363 deletions(-) >=20 > -- > 2.18.0 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel