From: "Liming Gao" <liming.gao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
Leif Lindholm <leif.lindholm@linaro.org>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
Rebecca Cran <rebecca@bsdio.com>,
"Feng, Bob C" <bob.c.feng@intel.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>,
"afish@apple.com" <afish@apple.com>
Subject: Re: [PATCH 1/1] edksetup.sh: rework python executable scanning
Date: Wed, 17 Jul 2019 14:32:48 +0000 [thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4A9EF5@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <6d14f24e-34ed-ea7f-3921-9c09604a9628@redhat.com>
Laszlo:
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Wednesday, July 17, 2019 6:22 PM
> To: Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
> Cc: devel@edk2.groups.io; Rebecca Cran <rebecca@bsdio.com>; Feng, Bob C <bob.c.feng@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; afish@apple.com
> Subject: Re: [PATCH 1/1] edksetup.sh: rework python executable scanning
>
> On 07/17/19 05:23, Gao, Liming wrote:
> > Leif:
> > I agree to discuss the behavior first, then review the code logic in detail. I add my comments below.
> >
> >> -----Original Message-----
> >> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> >> Sent: Wednesday, July 17, 2019 6:05 AM
> >> To: Laszlo Ersek <lersek@redhat.com>
> >> Cc: devel@edk2.groups.io; Rebecca Cran <rebecca@bsdio.com>; Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming
> >> <liming.gao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; afish@apple.com
> >> Subject: Re: [PATCH 1/1] edksetup.sh: rework python executable scanning
>
> >> - What does PYTHON3_ENABLE mean? Is it for probing only, or are we
> >> setting it for later use by BaseTools?
> >
> > PYTHON3_EANBLE is to decide python3 enable or not. It has high priority.
> > Once it is set, PYTHON_COMMAND will be ignored.
> > If it is set to TRUE, edksetup.sh will find Python3 in the system, set PYTHON_COMMAND env.
> > If it is set to other value, edksetup.sh will find Python3 in the system, set PYTHON_COMMAND env.
Correct one typo here, sorry for the confuse.
If it is set to other value, edksetup.sh will find Python2 in the system, set PYTHON_COMMAND env.
> > If PYTHON3_EANBLE is not set, PYTHON_COMMAND will be used if PYTHON_COMMAND is set.
> > If PYTHON3_EANBLE is not set, and PYTHON_COMMAND is not set, the default behavior will set PYTHON3_EANBLE to TRUE.
>
> I find this confusing. Basically, PYTHON3_EANBLE says, "ignore
> PYTHON_COMMAND, just go for the highest python3 version".
>
> But that is the exact same behavior as if the user didn't set *either*
> PYTHON3_EANBLE *or* PYTHON_COMMAND. So why do we have two configurations
> for the exact same behavior?
>
> Namely (to repeat):
>
> (1) PYTHON3_EANBLE is set to a non-null string: PYTHON_COMMAND is
> ignored, and we pick the highest minor version of python3.
>
> (2) PYTHON3_EANBLE is unset, and PYTHON_COMMAND is unset: we pick the
> highest minor version of python3.
>
> Those configurations -- evoking identical behavior -- could be collapsed
> into one configuration, namely, if we simply eliminated PYTHON3_EANBLE,
> and relied on PYTHON_COMMAND only. Here's how:
>
> * PYTHON_COMMAND is unset: pick the highest minor version of python3.
Before Python3 enable, there is no requirement to set PYTHON_COMMAND path.
To keep this support, introduce PYTHON3_ENABLE for auto find python2 or python3.
Thanks
Liming
>
> Thanks
> Laszlo
next prev parent reply other threads:[~2019-07-17 14:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 19:07 [PATCH 1/1] edksetup.sh: rework python executable scanning Leif Lindholm
2019-07-16 20:10 ` [edk2-devel] " rebecca
2019-07-17 14:04 ` Leif Lindholm
2019-07-16 20:49 ` Laszlo Ersek
2019-07-16 22:04 ` Leif Lindholm
2019-07-17 3:23 ` Liming Gao
2019-07-17 10:21 ` Laszlo Ersek
2019-07-17 14:32 ` Liming Gao [this message]
2019-07-17 19:43 ` Laszlo Ersek
2019-07-17 22:37 ` Leif Lindholm
2019-07-18 16:48 ` [edk2-devel] " Liming Gao
2019-07-18 17:55 ` Leif Lindholm
2019-07-19 13:07 ` Liming Gao
2019-07-23 9:44 ` Leif Lindholm
2019-07-24 15:29 ` Liming Gao
2019-07-17 10:13 ` Laszlo Ersek
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=4A89E2EF3DFEDB4C8BFDE51014F606A14E4A9EF5@SHSMSX104.ccr.corp.intel.com \
--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