]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
py-compile: fix display when compiling multiple files
authorMike Frysinger <vapier@gentoo.org>
Sun, 6 Feb 2022 06:24:52 +0000 (01:24 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sun, 6 Feb 2022 06:24:52 +0000 (01:24 -0500)
The compilation steps print the filename as it runs, but forgets to add
a space after it, so they all get squashed together:
$ ./py-compile 1.py 2.py 3.py
Byte-compiling python modules...
1.py2.py.3.py

* lib/py-compile: Add missing write.

lib/py-compile

index 734bd6a3cd7f38c622b585a30ebd697ab0b04a5b..6295b2dac78e12027e09cb9f675f0219cb8ea0a8 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # py-compile - Compile a Python program
 
-scriptversion=2022-02-06.06; # UTC
+scriptversion=2022-02-06.07; # UTC
 
 # Copyright (C) 2000-2022 Free Software Foundation, Inc.
 
@@ -141,7 +141,7 @@ for file in sys.argv[1:]:
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
            continue
-    sys.stdout.write(file)
+    sys.stdout.write(file + ' ')
     sys.stdout.flush()
     if hasattr(sys.implementation, 'cache_tag'):
         py_compile.compile(filepath, importlib.util.cache_from_source(filepath), path)
@@ -163,7 +163,7 @@ for file in sys.argv[1:]:
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
            continue
-    sys.stdout.write(file)
+    sys.stdout.write(file + ' ')
     sys.stdout.flush()
     if hasattr(sys.implementation, 'cache_tag'):
         py_compile.compile(filepath, importlib.util.cache_from_source(filepath), path)