This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Convert all Python scripts to Python 3


On Fri, Jan 31, 2020 at 9:29 AM Zack Weinberg <zackw@panix.com> wrote:
>
> On Fri, Jan 31, 2020 at 12:10 PM Alistair Francis
> <alistair.francis@wdc.com> wrote:>
> > Convert all of the Python scripts in tree to explicity use Python 3.
>
> More accurate to say "Change all of the #! lines on Python scripts in
> tree to reference /usr/bin/python3."
>
> > I have not explicity tested all of the scripts. Makefiles generally
> > explicitly use $(PYTHON) so the scripts should already support Python3.
>
> I think this change needs manual explicit testing that all of the
> scripts do in fact work with Python 3 (and not just any Python 3, but
> specifically version 3.4, since that's the oldest version that

I don't have a way to test all of the scripts, especially with Python 3.4.

My original patch just updated math/gen-libm-test.py as I have tested
that with Python 3 (although not 3.4). I don't know if I will be able
to explicitly test all of the scripts with Python3 (definitely not
with 3.4, where do you even get that?). The painful part with Python
testing is you actually need to run the code, not just run the script
once.

With Python2 EOL and the assumption that everyone is already using
Python3 anyway (and calling this scripts with $(PYTHON)) I was hoping
this would be enough.

> install.texi says should work).  We should also verify that the
> autoconf logic that sets $(PYTHON) will bomb out if the only available
> version of Python is 2.x. (It looks to me like it _should_ do that,
> but I want it tested in an environment with no trace of a Python 3
> installation.)  And the alternative of using bare "python" for
> $(PYTHON) should be removed at the same time as the #! lines are
> changed.

I also have no way to test a setup with Python 2.

On Arch "python" is Python3, so I don't think we should error if
"python" is set.

Alistair

>
> zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]