From: Gary Lin <glin@suse.com>
To: "Zhu, Yonghong" <yonghong.zhu@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [PATCH v3 05/20] BaseTools: Use the python3-range functions
Date: Fri, 22 Jun 2018 17:13:23 +0800 [thread overview]
Message-ID: <20180622091323.h5tcdy32wx5yjmmv@GaryWorkstation> (raw)
In-Reply-To: <B9726D6DCCFB8B4CA276A9169B02216D5209B15F@SHSMSX103.ccr.corp.intel.com>
On Fri, Jun 22, 2018 at 08:53:04AM +0000, Zhu, Yonghong wrote:
> Hi Gary,
>
> My test env is Windows. I applied Patch 16, and seems this patch only for Linux.
>
Ah, right. The patch is Linux only, and sadly I only have Linux.
I guess the similar change may work for windows.
Could you try to modify build.bat and GenFds.bat in
BaseTools\BinWrappers\WindowsLike\ as the following?
@setlocal
@set ToolName=%~n0%
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
@%PYTHON_HOME%\python.exe -m %ToolName%.%ToolName% %*
I'm not sure whether it should be '-m' or '/m' though. The goal is treat
build and GenFds as modules to avoid the error you saw.
Thanks,
Gary Lin
> Best Regards,
> Zhu Yonghong
>
>
> -----Original Message-----
> From: Gary Lin [mailto:glin@suse.com]
> Sent: Friday, June 22, 2018 4:46 PM
> To: Zhu, Yonghong <yonghong.zhu@intel.com>
> Cc: edk2-devel@lists.01.org; Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2] [PATCH v3 05/20] BaseTools: Use the python3-range functions
>
> On Fri, Jun 22, 2018 at 04:21:23PM +0800, Gary Lin wrote:
> > On Fri, Jun 22, 2018 at 05:29:21AM +0000, Zhu, Yonghong wrote:
> > > Hi Gary,
> > >
> > > Patch 03 used some Tab characters, Patch 17 has some Trailing whitespace. You can use the BaseTools\Scripts\PatchCheck.py to check its format.
> > >
> > Ok, will fix them in the next version.
> >
> > > I try to build OVMF platform, it directly report error:
> > > from .BuildReport import BuildReport
> > > ValueError: Attempted relative import in non-package
> > >
> > I didn't see this in my system. Will investigate what's wrong.
> >
> Hi Yonghong,
>
> The error showed when I reverted patch 16. Would you mind to check whether patch 16 was applied or not?
>
> Thanks,
>
> Gary Lin
>
> > Thanks,
> >
> > Gary Lin
> >
> > > Best Regards,
> > > Zhu Yonghong
> > >
> > > -----Original Message-----
> > > From: Gary Lin [mailto:glin@suse.com]
> > > Sent: Friday, June 22, 2018 10:04 AM
> > > To: Zhu, Yonghong <yonghong.zhu@intel.com>
> > > Cc: edk2-devel@lists.01.org; Gao, Liming <liming.gao@intel.com>
> > > Subject: Re: [edk2] [PATCH v3 05/20] BaseTools: Use the
> > > python3-range functions
> > >
> > > On Thu, Jun 21, 2018 at 12:40:29PM +0000, Zhu, Yonghong wrote:
> > > > Hi Gary,
> > > >
> > > > Python 2.7 doesn't have the module builtins, if we apply this patch now, it will cause build failure on Python 2.7.
> > > >
> > > Urhh, I thought it's a "built-in" module but it's actually from
> > > python-future.
> > >
> > > I'll revert this patch and post a new patchset.
> > > BTW, would you might review the first patch? It's just a typo fix
> > > and I just caught it while running the futurize script, so the patch
> > > is actually independent from this patch series.
> > >
> > > Thanks,
> > >
> > > Gary Lin
> > >
> > > > Best Regards,
> > > > Zhu Yonghong
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Gary Lin [mailto:glin@suse.com]
> > > > Sent: Thursday, June 21, 2018 12:44 PM
> > > > To: edk2-devel@lists.01.org
> > > > Cc: Zhu, Yonghong <yonghong.zhu@intel.com>; Gao, Liming
> > > > <liming.gao@intel.com>
> > > > Subject: [PATCH v3 05/20] BaseTools: Use the python3-range
> > > > functions
> > > >
> > > > Replace xrange() and range() with the newer range() function Based on "futurize -f libfuturize.fixes.fix_xrange_with_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>
>
next prev parent reply other threads:[~2018-06-22 9:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-21 4:43 [PATCH v3 00/20] BaseTools: One step toward python3 Gary Lin
2018-06-21 4:43 ` [PATCH v3 01/20] BaseTools: Fix a typo in ini.py Gary Lin
2018-06-21 15:46 ` Carsey, Jaben
2018-06-21 4:43 ` [PATCH v3 02/20] BaseTools: Refactor python except statements Gary Lin
2018-06-21 6:27 ` Gary Lin
2018-06-21 4:43 ` [PATCH v3 03/20] BaseTools: Refactor python print statements Gary Lin
2018-06-21 4:43 ` [PATCH v3 04/20] BaseTools: Remove the old python "not-equal" Gary Lin
2018-06-21 4:43 ` [PATCH v3 05/20] BaseTools: Use the python3-range functions Gary Lin
2018-06-21 12:40 ` Zhu, Yonghong
2018-06-22 2:04 ` Gary Lin
2018-06-22 5:29 ` Zhu, Yonghong
2018-06-22 8:21 ` Gary Lin
2018-06-22 8:45 ` Gary Lin
2018-06-22 8:53 ` Zhu, Yonghong
2018-06-22 9:13 ` Gary Lin [this message]
2018-06-22 9:22 ` Zhu, Yonghong
2018-06-22 9:24 ` Zhu, Yonghong
2018-06-22 9:48 ` Gary Lin
2018-06-22 10:22 ` Zhu, Yonghong
2018-06-25 3:34 ` Gary Lin
2018-06-25 5:58 ` Zhu, Yonghong
2018-06-25 6:18 ` Gary Lin
2018-06-21 4:43 ` [PATCH v3 06/20] BaseTools: Remove tuple parameter in python scripts Gary Lin
2018-06-21 4:43 ` [PATCH v3 07/20] BaseTools: Remove the deprecated hash_key() Gary Lin
2018-06-21 4:43 ` [PATCH v3 08/20] BaseTools: Replace StandardError with Expression Gary Lin
2018-06-21 4:43 ` [PATCH v3 09/20] BaseTools: Remove types.TypeType Gary Lin
2018-06-21 4:43 ` [PATCH v3 10/20] BaseTools: Refactor python raise statement Gary Lin
2018-06-21 4:43 ` [PATCH v3 11/20] BaseTools: Adjust the spaces around commas and colons Gary Lin
2018-06-21 4:43 ` [PATCH v3 12/20] BaseTools: Migrate to the new octal literal Gary Lin
2018-06-21 4:43 ` [PATCH v3 13/20] BaseTools: Unify long int and int in python scripts Gary Lin
2018-06-21 4:43 ` [PATCH v3 14/20] BaseTools: Fix old python2 idioms Gary Lin
2018-06-21 4:43 ` [PATCH v3 15/20] BaseTools: Replace StringIO.StringIO with io.BytesIO Gary Lin
2018-06-21 4:43 ` [PATCH v3 16/20] BaseTools: Treat GenFds.py and build.py as python modules Gary Lin
2018-06-21 4:43 ` [PATCH v3 17/20] BaseTools: Adopt absolute import for python scripts Gary Lin
2018-06-21 4:43 ` [PATCH v3 18/20] BaseTools: Move OverrideAttribs to OptRomInfStatement.py Gary Lin
2018-06-21 4:43 ` [PATCH v3 19/20] BaseTools: Move FindExtendTool to GenFdsGlobalVariable.py Gary Lin
2018-06-21 4:43 ` [PATCH v3 20/20] BaseTools: Move ImageBinDict " Gary Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180622091323.h5tcdy32wx5yjmmv@GaryWorkstation \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox