Liming, Adding a new Python3 directory will increase the maintenance and testing of the python-based BaseTools.
It would be better if we could have one version of the python sources that work with both Python2 and Python3. We should use the edk2-staging branch to work towards this goal. Please explain why we can't support both in single set of sources. Are there technical reasons or resource reasons? Thanks, Mike From: Gao, Liming Sent: Friday, November 16, 2018 7:02 AM To: [email protected] Cc: Kinney, Michael D <[email protected]>; [email protected]; Laszlo Ersek ([email protected]) <[email protected]>; [email protected] Subject: [RFC] Proposal on Python3 Migration Hi, all https://pythonclock.org/ say Python 2.7 will not be maintained past 2020. One BZ https://bugzilla.tianocore.org/show_bug.cgi?id=55 also requests this migration. And, Python37 does good performance optimization. In EDK2 build, Python37 can improve 20% performance than Python27 in Build AutoGen phase. So, we plan to add Python3 support in BaseTools. In previous discussion, the feedback is not to drop Python2 support in short term, and keep Python2 and Python3 coexist. My proposal is to add two copy BaseTools Python code in BaseTools/Source directory. One is current BaseTools/Source/Python, another is new BaseTools/Source/Python3. edksetup.bat/edksetup.sh base on environment variable (PYTHON3_HOME) to know whether Python3 is used. If PYTHON3_HOME is not set, Python2 is still used as current way. If user wants to enable Python3, he needs to set PYTHON3_HOME. After 201811 release tag, BaseTools Python2 source code is kept as the stable release. Python3 is as the active trunk. By default, any change will be for Python3. If the submitter also request the change for Python2, he needs to list it in BZ description. If the submitter has the clear request, Python2 can add new feature or enhancement. If you have any comments or suggestion on Python3 migration, please join this discussion. Thanks Liming _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

