From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5623D21A09130 for ; Mon, 7 Jan 2019 11:04:07 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3AA313269F; Mon, 7 Jan 2019 19:04:06 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-126-62.rdu2.redhat.com [10.10.126.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4183B19744; Mon, 7 Jan 2019 19:04:05 +0000 (UTC) To: "Gao, Liming" , "Ni, Ray" , "edk2-devel@lists.01.org" , "leif.lindholm@linaro.org" , "afish@apple.com" , "Kinney, Michael D" References: <4A89E2EF3DFEDB4C8BFDE51014F606A14E39130F@SHSMSX104.ccr.corp.intel.com> <2b49bd5c-968e-d7b0-e975-9d3da2101bc3@Intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AD26C@SHSMSX152.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: <5e943b6c-6df2-fe06-198e-5ff5ab43c9a0@redhat.com> Date: Mon, 7 Jan 2019 20:04:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3AD26C@SHSMSX152.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 07 Jan 2019 19:04:06 +0000 (UTC) Subject: Re: [RFC] Edk2 BaseTools Python3 Migration Update X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 X-List-Received-Date: Mon, 07 Jan 2019 19:04:07 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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