From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Thu, 05 Sep 2019 06:53:40 -0700 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94D83300CB2B; Thu, 5 Sep 2019 13:53:39 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-133.ams2.redhat.com [10.36.116.133]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60D2D5C299; Thu, 5 Sep 2019 13:53:38 +0000 (UTC) Subject: Re: [edk2-devel] [edk2] [Patch 32/33] BaseTools: ECC tool Python3 adaption To: Leif Lindholm , "Feng, Bob C" Cc: "devel@edk2.groups.io" , "Gao, Liming" References: <20190129020610.14300-1-bob.c.feng@intel.com> <20190129020610.14300-33-bob.c.feng@intel.com> <20190902190211.GZ29255@bivouac.eciton.net> <20190902190438.GA29255@bivouac.eciton.net> <08650203BA1BD64D8AD9B6D5D74A85D16152FF60@SHSMSX104.ccr.corp.intel.com> <20190904083810.GD29255@bivouac.eciton.net> <08650203BA1BD64D8AD9B6D5D74A85D161530544@SHSMSX104.ccr.corp.intel.com> <20190904095151.GE29255@bivouac.eciton.net> <08650203BA1BD64D8AD9B6D5D74A85D161531023@SHSMSX104.ccr.corp.intel.com> <20190905103725.GT29255@bivouac.eciton.net> From: "Laszlo Ersek" Message-ID: <7d9860d3-91e0-81e7-051b-4c3d234a9d5d@redhat.com> Date: Thu, 5 Sep 2019 15:53:37 +0200 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: <20190905103725.GT29255@bivouac.eciton.net> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 05 Sep 2019 13:53:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 09/05/19 12:37, Leif Lindholm wrote: > Hi Bob, (+Laszlo, due to a question at the end) > > On Thu, Sep 05, 2019 at 05:39:05AM +0000, Feng, Bob C wrote: >> Would you try to install antlr4-python3-runtime on debian. >> pip install antlr4-python3-runtime > > I'd rather not. For the reasons described by Laszlo in the > discussion leading to the creation of edk2-tools: > https://edk2.groups.io/g/devel/message/40380 > > Now, if Ecc was moved to edk2-tools, I guess that would be fine. It > also means we increase the hurdle for running Ecc. > >> I think python3 + antlr3 would not be a good combination, since the >> antlr3 for python3 is still in beta and has not been update for 7 >> years. And I think there is no ECC test for such combination. > > Nevertheless python3-antlr3 was packaged by debian/ubuntu as late as > last year, as part of their OpenStack work. And is now part of both > distributions. > > Laszlo - which python-antlr versions are packaged in > centos/fedora/redhat? None. * antlr4: The following Fedora feature requests have been dormant for quite some time: - antlr4-4.7.1 is available https://bugzilla.redhat.com/show_bug.cgi?id=1596974 - antlr4: python 3 runtime support https://bugzilla.redhat.com/show_bug.cgi?id=1599015 This proved so much of a problem for the maintainers of the "coq" package that they went ahead and bundled the python 3 runtime with the "coq" package, for their own internal use only: https://koji.fedoraproject.org/koji/buildinfo?buildID=1370928 The SPEC file in the "coq-8.9.1-6.fc32.src.rpm" file, downloaded from that link, says: > # NOTE: Due to no action on bz 1596974 and bz 1599015 for months, we now bundle > # the necessary python3 runtime for antlr4. Once those bugs are addressed, we > # can unbundle and use the system antlr4 python3 runtime. So now you can install "antlr4-python3-runtime", but it's not built from the "antlr4" source package, it's built from the "coq" one. I don't think anyone would want to rely on that, for use cases not related to "coq". Regarding Python 2 support -- no need to look. https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal For example, the changelog of even the antlr-2 package says, https://koji.fedoraproject.org/koji/buildinfo?buildID=1321182 > * Wed Mar 27 2019 Miro Hron ok - 0:2.7.7-58 > - Subpackage python2-antlr was removed > https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal In Debian too, "python3-antlr4" is a wish-list / prospective package: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897129 * Regarding antlr3, I couldn't find a standalone python support package in Fedora. And, the antlr3 source package itself: https://koji.fedoraproject.org/koji/buildinfo?buildID=1345133 doesn't seem to produce python bindings (see under "noarch"). * Given the Fedora situation, it's virtually impossible that CentOS or RHEL ship the package (I haven't even checked). * However; since the discussion that you link near the top, I've come across the following blog post: https://developers.redhat.com/blog/2018/11/14/python-in-rhel-8/ and virtual environments were also mentioned by Mike and Sean, in the same thread that you link: - http://mid.mail-archive.com/E92EE9817A31E24EB0585FDF735412F5B9CA5998@ORSMSX113.amr.corp.intel.com https://edk2.groups.io/g/devel/message/40389 - http://mid.mail-archive.com/19931.1557456493073446522@groups.io https://edk2.groups.io/g/devel/message/40393 So I guess there should be a way to make "pip install" work, without messing up the system. I've never tried. Thanks Laszlo