[edk2-devel] [edk2] [Patch 32/33] BaseTools: ECC tool Python3 adaption

Laszlo Ersek lersek at redhat.com
Thu Sep 5 13:53:37 UTC 2019


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 <mhroncok at redhat.com> - 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

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46899): https://edk2.groups.io/g/devel/message/46899
Mute This Topic: https://groups.io/mt/33115040/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list