[RFC,v6,01/23] math/gen-libm-test.py: Convert to Python 3

Message ID aae283ad32728367c2d5da8c808830dca38ab658.1578824547.git.alistair.francis@wdc.com
State Committed
Headers

Commit Message

Alistair Francis Jan. 12, 2020, 10:33 a.m. UTC
  Convert to explicity use Python 3. This was tested by using the script
(with Python 3) to generate the RV32 libm-test-ulps.
---
 math/gen-libm-test.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Joseph Myers Jan. 12, 2020, 2:46 p.m. UTC | #1
On Sun, 12 Jan 2020, Alistair Francis wrote:

> Convert to explicity use Python 3. This was tested by using the script
> (with Python 3) to generate the RV32 libm-test-ulps.

There are several .py scripts in the source tree that reference 
/usr/bin/python.  It doesn't normally matter because the makefiles 
explicitly use $(PYTHON), but I think you should change all ten such .py 
files at once to refer to python3.
  
Alistair Francis Jan. 14, 2020, 6:53 a.m. UTC | #2
On Mon, Jan 13, 2020 at 12:46 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Sun, 12 Jan 2020, Alistair Francis wrote:
>
> > Convert to explicity use Python 3. This was tested by using the script
> > (with Python 3) to generate the RV32 libm-test-ulps.
>
> There are several .py scripts in the source tree that reference
> /usr/bin/python.  It doesn't normally matter because the makefiles
> explicitly use $(PYTHON), but I think you should change all ten such .py
> files at once to refer to python3.

I have updated all of them, the only problem is then that I haven't
tested them all.

Alistair

>
> --
> Joseph S. Myers
> joseph@codesourcery.com
  

Patch

diff --git a/math/gen-libm-test.py b/math/gen-libm-test.py
index ec263397d8..0142c0f332 100755
--- a/math/gen-libm-test.py
+++ b/math/gen-libm-test.py
@@ -1,4 +1,4 @@ 
-#!/usr/bin/python
+#!/usr/bin/python3
 # Generate tests for libm functions.
 # Copyright (C) 2018-2020 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.