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 20251211A3216 for ; Tue, 8 Jan 2019 09:25:54 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0102783F44; Tue, 8 Jan 2019 17:25:53 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-197.rdu2.redhat.com [10.10.120.197]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F53D60CD0; Tue, 8 Jan 2019 17:25:50 +0000 (UTC) To: "Carsey, Jaben" , "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> <5e943b6c-6df2-fe06-198e-5ff5ab43c9a0@redhat.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14E3ADC62@SHSMSX152.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: <6bced16e-de8c-b098-5d07-52aed4ed7f53@redhat.com> Date: Tue, 8 Jan 2019 18:25:49 +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: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 08 Jan 2019 17:25:53 +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: Tue, 08 Jan 2019 17:25:54 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 ; Ni, Ray ; edk2- >> devel@lists.01.org; leif.lindholm@linaro.org; afish@apple.com; Kinney, >> Michael D >> 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 ; Ni, Ray ; edk2- >> devel@lists.01.org; leif.lindholm@linaro.org; >>> afish@apple.com; Kinney, Michael D >>> 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