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. 

Thanks
Liming
> -----Original Message-----
> From: Ni, Ray
> Sent: Monday, January 7, 2019 4:40 PM
> To: Gao, Liming <liming....@intel.com>; edk2-devel@lists.01.org
> Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Laszlo Ersek 
> (ler...@redhat.com) <ler...@redhat.com>
> Subject: Re: [edk2] [RFC] Edk2 BaseTools Python3 Migration Update
> 
> On 12/25/2018 3:50 PM, Gao, Liming wrote:
> > Hi, all
> >    On Python3 migration https://bugzilla.tianocore.org/show_bug.cgi?id=55, 
> > we update Edk2 BaseTools python source code with the
> compatible syntax to support Python2 and Python3 both. Here is code 
> https://github.com/lgao4/edk2/tree/Python3 for dry run. To
> enable Python3, you just need to set PYTHON3_ENABLE environment as TRUE, then 
> type edksetup.bat/edksetup.sh. Without this setting,
> BaseTools still run with Python2. So, there is no change for current usage 
> model with Python27.
> 
> Liming,
> I like Python3. But I don't like the idea of enabling Python3 depending
> on PYTHON3_ENABLE environment variable.
> I prefer BaseTools to use Python3 by default when PYTHON3_ENABLE is not set.
> When PYTHON3_ENABLE is set, BaseTools can use the desired python version
> following the environment variable.
> 
> Do you agree? Or any objection?
> 
> 
> >
> >    But, we have no enough resource to fully verify Python2 and Python3 
> > both. We will focus on Python3 validation. If anyone can help
> verify Python2, it will be great. And, if you meet with the issue on Python2, 
> please file BZ. We still fix them.
> >
> > Thanks
> > Liming
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
> 
> 
> --
> Thanks,
> Ray
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to