Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-24 Thread Liming Gao
Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable > scanning > > On Fri, Jul 19, 2019 at 01:07:54PM +, Gao, Liming wrote: > > > Yes. > > > But perhaps the user isn't the admin, and the admin installs a new > > > version of python without u

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-23 Thread Leif Lindholm
On Fri, Jul 19, 2019 at 01:07:54PM +, Gao, Liming wrote: > > Yes. > > But perhaps the user isn't the admin, and the admin installs a new > > version of python without updating the default links, in order to let > > a different user test the new version. Thinking this will not affect > > users,

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-19 Thread Liming Gao
e: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable > scanning > > On Thu, Jul 18, 2019 at 04:48:18PM +, Gao, Liming wrote: > > > > Find the high version python. When we enable Python3, we find > > > > Python37 does great performance optimization

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-18 Thread Leif Lindholm
On Thu, Jul 18, 2019 at 04:48:18PM +, Gao, Liming wrote: > > > Find the high version python. When we enable Python3, we find > > > Python37 does great performance optimization. > > > So, we think high version python can bring more benefit. > > > > This is where I disagree. > > As a

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-18 Thread Liming Gao
hael D ; af...@apple.com > Subject: Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable > scanning > > On Wed, Jul 17, 2019 at 03:23:26AM +, Gao, Liming wrote: > > Leif: > > I agree to discuss the behavior first, then review the co

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-17 Thread Leif Lindholm
On Wed, Jul 17, 2019 at 03:23:26AM +, 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.lindh...@linaro.org] > > So, first of all - I am

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-17 Thread Laszlo Ersek
On 07/17/19 16:32, Gao, Liming wrote: > Laszlo: > >> -Original Message- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Wednesday, July 17, 2019 6:22 PM >> To: Gao, Liming ; Leif Lindholm >> >> Cc: devel@edk2.groups.io; Rebecca Cran ; Feng, Bob C >> ; Kinney, Michael D >> ;

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-17 Thread Liming Gao
Laszlo: > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Wednesday, July 17, 2019 6:22 PM > To: Gao, Liming ; Leif Lindholm > > Cc: devel@edk2.groups.io; Rebecca Cran ; Feng, Bob C > ; Kinney, Michael D > ; af...@apple.com > Subject: Re: [PATCH 1/1]

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-17 Thread Leif Lindholm
On Tue, Jul 16, 2019 at 02:10:43PM -0600, Rebecca Cran wrote: > On 2019-07-16 13:07, Leif Lindholm wrote: > > +EXECUTABLE=`basename $file` > > +VERSION=`echo $EXECUTABLE | sed 's/[^0-9.]//g'` > > + > > +MAJOR=`echo $VERSION | sed 's/\([0-9]*\)\.*.*/\1/'` > > +

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-17 Thread Laszlo Ersek
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.lindh...@linaro.org] >> Sent: Wednesday, July 17, 2019 6:05 AM >> To:

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-17 Thread Laszlo Ersek
On 07/17/19 00:04, Leif Lindholm wrote: > On Tue, Jul 16, 2019 at 10:49:03PM +0200, Laszlo Ersek wrote: >> Hi Leif, >> >> On 07/16/19 21:07, Leif Lindholm wrote: >>> If PYTHON_COMMAND is set, use that. >>> If PYTHON_COMMAND is not set, use first working of "python", "python3", >>> "python2". >>>

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-16 Thread Liming Gao
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.lindh...@linaro.org] > Sent: Wednesday, July 17, 2019 6:05 AM > To: Laszlo Ersek > Cc: devel@edk2.groups.io; Rebecca

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-16 Thread Leif Lindholm
On Tue, Jul 16, 2019 at 10:49:03PM +0200, Laszlo Ersek wrote: > Hi Leif, > > On 07/16/19 21:07, Leif Lindholm wrote: > > If PYTHON_COMMAND is set, use that. > > If PYTHON_COMMAND is not set, use first working of "python", "python3", > > "python2". > > If none of those work, search the path for

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-16 Thread Laszlo Ersek
Hi Leif, On 07/16/19 21:07, Leif Lindholm wrote: > If PYTHON_COMMAND is set, use that. > If PYTHON_COMMAND is not set, use first working of "python", "python3", > "python2". > If none of those work, search the path for python*[0-9], using the highest > version > number across x.y.z format. > >

Re: [edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-16 Thread rebecca
On 2019-07-16 13:07, Leif Lindholm wrote: > +EXECUTABLE=`basename $file` > +VERSION=`echo $EXECUTABLE | sed 's/[^0-9.]//g'` > + > +MAJOR=`echo $VERSION | sed 's/\([0-9]*\)\.*.*/\1/'` > +MINOR=`echo $VERSION | sed 's/[0-9]*\.*\([0-9]*\).*/\1/'` > +PATCH=`echo

[edk2-devel] [PATCH 1/1] edksetup.sh: rework python executable scanning

2019-07-16 Thread Leif Lindholm
If PYTHON_COMMAND is set, use that. If PYTHON_COMMAND is not set, use first working of "python", "python3", "python2". If none of those work, search the path for python*[0-9], using the highest version number across x.y.z format. Finally, set PYTHON3_ENABLE if selected python is python 3.