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 BEE79211B113F for ; Wed, 9 Jan 2019 02:13:27 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 22CF681F0C; Wed, 9 Jan 2019 10:13:27 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-11.rdu2.redhat.com [10.10.120.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62B59100034B; Wed, 9 Jan 2019 10:13:25 +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> <6bced16e-de8c-b098-5d07-52aed4ed7f53@redhat.com> From: Laszlo Ersek Message-ID: <6d67ae06-e769-83d4-bcb3-beca2bcd4e7d@redhat.com> Date: Wed, 9 Jan 2019 11:13:24 +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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 09 Jan 2019 10:13:27 +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: Wed, 09 Jan 2019 10:13:28 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 01/08/19 19:05, Carsey, Jaben wrote: > > >> -----Original Message----- >> From: Laszlo Ersek [mailto:lersek@redhat.com] >> Sent: Tuesday, January 08, 2019 9:26 AM >> To: Carsey, Jaben ; 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 >> Importance: High >> >> 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). > > Laszlo, you lost me. How is that related to an exact path? If the user specifies the path, then always use that specific interpreter. Sorry, my fault. I've been confused by an *earlier* approach that was described here: https://bugzilla.tianocore.org/show_bug.cgi?id=55#c10 https://bugzilla.tianocore.org/show_bug.cgi?id=55#c12 In that case, if the user only specified the interpreter path, it would be clear what *interpreter* to use, however it would not be not clear what *sub-codebase* from BaseTools to run on that interpreter: the Python2 one, or the Python3 one. However, now I remember, from https://bugzilla.tianocore.org/show_bug.cgi?id=55#c14 https://bugzilla.tianocore.org/show_bug.cgi?id=55#c15 that after all, the goal is a single common set of BaseTools source code that runs on Python2 and Python3 alike. In that regard, I agree that the interpreter pathname is the *only* input we should take & accept from the user, and the particular python *language version* need neither be provided by the user, nor be detected by BaseTools themselves. Sorry about the confusion! Thanks, Laszlo