[Bug other/109668] 'python' vs. 'python3'

2024-03-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109668

--- Comment #6 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Jakub Jelinek
:

https://gcc.gnu.org/g:8c4785e77e8b54109fbb4f81a3b624e98184c2aa

commit r13-8449-g8c4785e77e8b54109fbb4f81a3b624e98184c2aa
Author: Sam James 
Date:   Fri Mar 8 15:24:20 2024 +0100

contrib: Improve dg-extract-results.sh's Python detection [PR109668]

'python' on some systems (e.g. SLES 15) might be Python 2. Prefer python3,
then python, then python2 (as the script still tries to work there).

PR other/109668
* dg-extract-results.sh: Check for python3 before python. Check for
python2 last.

(cherry picked from commit 64273a7e6bd8ba60058174d147521dd65d705637)

[Bug other/109668] 'python' vs. 'python3'

2024-03-08 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109668

--- Comment #5 from GCC Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:64273a7e6bd8ba60058174d147521dd65d705637

commit r14-9393-g64273a7e6bd8ba60058174d147521dd65d705637
Author: Sam James 
Date:   Fri Mar 8 15:24:20 2024 +0100

contrib: Improve dg-extract-results.sh's Python detection [PR109668]

'python' on some systems (e.g. SLES 15) might be Python 2. Prefer python3,
then python, then python2 (as the script still tries to work there).

PR other/109668
* dg-extract-results.sh: Check for python3 before python. Check for
python2 last.

[Bug other/109668] 'python' vs. 'python3'

2024-02-22 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109668

--- Comment #4 from GCC Commits  ---
The master branch has been updated by Kito Cheng :

https://gcc.gnu.org/g:23f5da91ccb4927562ea4d1c245639bfd4a0088b

commit r14-9144-g23f5da91ccb4927562ea4d1c245639bfd4a0088b
Author: Palmer Dabbelt 
Date:   Fri Feb 9 08:53:24 2024 -0800

RISC-V: Point our Python scripts at python3

This builds for me, and I frequently have python-is-python3 type
packages installed so I think I've been implicitly testing it for a
while.  Looks like Kito's tested similar configurations, and the
bugzilla indicates we should be moving over.

gcc/ChangeLog:

PR other/109668
* config/riscv/arch-canonicalize: Move to python3
* config/riscv/multilib-generator: Likewise

[Bug other/109668] 'python' vs. 'python3'

2024-02-09 Thread palmer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109668

palmer at gcc dot gnu.org changed:

   What|Removed |Added

 CC||palmer at gcc dot gnu.org

--- Comment #3 from palmer at gcc dot gnu.org ---
Jan-Benedict Glaw is reporting (via a crosstool-ng bug
) that we've got a
few python2 scripts in the RISC-V port that can just be converted over.  I just
sent along a patch to clean that up.

[Bug other/109668] 'python' vs. 'python3'

2023-10-24 Thread piannetta at kalrayinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109668

Paul Iannetta  changed:

   What|Removed |Added

 CC||piannetta at kalrayinc dot com

--- Comment #2 from Paul Iannetta  ---
My first guess was that unless GCC made clear that it will requires Python3, I
thought that all the Python scripts should be kept compatible with both Python2
and Python3.

However, looking at GCC sources, most python files already require python3 in
their shebang (#!/usr/bin/env python3), which would suggest that we can safely
drop python2 and use python3 everywhere, and rewrite the few #!/usr/bin/python3
to #!/usr/bin/env python3

% find gcc/ -iname "*.py" -exec head -n 1 '{}' + | grep "python$" -C 1
==> ./libstdc++-v3/scripts/make_graph.py <==
#!/usr/bin/python

==> ./libffi/generate-darwin-source-and-headers.py <==
#!/usr/bin/env python

==> ./contrib/jit-coverage-report.py <==
#! /usr/bin/python

==> ./contrib/dg-extract-results.py <==
#!/usr/bin/python

==> ./contrib/unused_functions.py <==
#!/usr/bin/env python

[Bug other/109668] 'python' vs. 'python3'

2023-05-09 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109668

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Well, python2 is long time out of support and should not be used.
I think the correct Shebang for Python3 today is:
#!/usr/bin/env python3

and all the remaining Python2 scripts should be ported to Python3.