From: Laszlo Ersek <lersek@redhat.com>
To: "Carsey, Jaben" <jaben.carsey@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Ni, Ray" <ray.ni@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"afish@apple.com" <afish@apple.com>,
"Kinney, Michael D" <michael.d.kinney@intel.com>
Subject: Re: [RFC] Edk2 BaseTools Python3 Migration Update
Date: Tue, 8 Jan 2019 18:25:49 +0100 [thread overview]
Message-ID: <6bced16e-de8c-b098-5d07-52aed4ed7f53@redhat.com> (raw)
In-Reply-To: <CB6E33457884FA40993F35157061515CB1267673@FMSMSX103.amr.corp.intel.com>
On 01/08/19 17:22, Carsey, Jaben wrote:
> Liming and Laszlo,
> What if we add a 4th option to the environment variable - the path to a specific python interpreter for use.
I thought of that, but how do the build tools derive the python version
just from the pathname of the interpreter?
Will they run "$INTERPRETER --version" and parse the output?
I think that could be brittle; distributions sometimes customize the
version strings of their executables. The "--version" output is usually
human-readable, not machine-readable (per intent).
Thanks,
Laszlo
>
> -Jaben
>
>
>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>> Gao, Liming
>> Sent: Tuesday, January 08, 2019 6:23 AM
>> To: Laszlo Ersek <lersek@redhat.com>; Ni, Ray <ray.ni@intel.com>; edk2-
>> devel@lists.01.org; leif.lindholm@linaro.org; afish@apple.com; Kinney,
>> Michael D <michael.d.kinney@intel.com>
>> Subject: Re: [edk2] [RFC] Edk2 BaseTools Python3 Migration Update
>>
>> Laszlo:
>> Yes. This can be supported. But, I don't know what purpose to specify
>> python minor version of Python3. Current implementation in Python3 branch
>> always tries to find the high version installed in OS. For example, Python3.4,
>> Python3.7 are both installed, Python3.7 will be chosen. Does this policy meet
>> with your usage?
>>
>> Thanks
>> Liming
>>> -----Original Message-----
>>> From: Laszlo Ersek [mailto:lersek@redhat.com]
>>> Sent: Tuesday, January 8, 2019 3:04 AM
>>> To: Gao, Liming <liming.gao@intel.com>; Ni, Ray <ray.ni@intel.com>; edk2-
>> devel@lists.01.org; leif.lindholm@linaro.org;
>>> afish@apple.com; Kinney, Michael D <michael.d.kinney@intel.com>
>>> Subject: Re: [edk2] [RFC] Edk2 BaseTools Python3 Migration Update
>>>
>>> On 01/07/19 14:41, Gao, Liming wrote:
>>>> Ray:
>>>> I think this proposal is good to recommend Python3 as the default
>> interpreter. I summary the updated proposal.
>>>>
>>>> 1. PYTHON3_ENABLE env is not set. edksetup.bat/edksetup.sh will find
>> higher version python installed in OS. If Python3 is found,
>>> Python3 will be used. Then, if python2 is found, and python2 is used. If not
>> found, report error and stop build. This will change the
>>> default python interpreter from Python2 to Python3 when they both are
>> installed.
>>>> 2. PYTHON3_EANBLE env is set to TRUE. edksetup.bat/edksetup.sh will
>> find Python3. If Python3 is found, Python3 will be used. If not
>>> found, report error and stop build.
>>>> 3. PYTHON3_ENABLE env is set to not TRUE. edksetup.bat/edksetup.sh
>> will find Python2. If Python2 is found, Python2 will be used. If
>>> not found, report error and stop build.
>>>> Once Python is found, edksetup.bat/edksetup.sh and build tool will both
>> print message to let user aware which version python tool is
>>> used in this build.
>>>
>>> If we're going for this level of flexibility, I'd like to suggest /
>>> request another improvement. Some Linux distros intend to accommodate
>>> multiple Python3 versions at the same time (this is not a typo; I don't
>>> mean Python2+Python3, but multiple Python3 versions). So basically I'd
>>> suggest that we offer a method for specifying a python version
>>> (2/3/auto-detect), plus, in case a specific major version is specified,
>>> that we allow the user to specify the precise interpreter pathname too.
>>>
>>> Thanks,
>>> Laszlo
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2019-01-08 17:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-25 7:50 [RFC] Edk2 BaseTools Python3 Migration Update Gao, Liming
2018-12-26 21:16 ` Laszlo Ersek
[not found] ` <20181228103951.GN4206@GaryWorkstation>
2018-12-29 6:07 ` Gao, Liming
2018-12-31 0:15 ` Laszlo Ersek
2019-01-02 1:52 ` Gao, Liming
2019-01-04 3:29 ` Gao, Liming
2019-01-07 19:04 ` Laszlo Ersek
2019-01-08 16:25 ` Laszlo Ersek
2019-01-02 9:26 ` Gary Lin
2019-01-07 8:39 ` Ni, Ruiyu
2019-01-07 13:41 ` Gao, Liming
2019-01-07 19:04 ` Laszlo Ersek
2019-01-08 14:22 ` Gao, Liming
2019-01-08 16:22 ` Carsey, Jaben
2019-01-08 17:25 ` Laszlo Ersek [this message]
2019-01-08 18:05 ` Carsey, Jaben
2019-01-09 0:43 ` Gao, Liming
2019-01-09 18:41 ` Carsey, Jaben
2019-01-09 10:13 ` Laszlo Ersek
2019-01-08 17:22 ` 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=6bced16e-de8c-b098-5d07-52aed4ed7f53@redhat.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