GNU bug report logs -
#38043
Incorrect Python byte-compiling for Python 3.5+ and PyPy3
Previous Next
Reported by: Michał Górny <mgorny <at> gentoo.org>
Date: Sun, 3 Nov 2019 10:47:02 UTC
Severity: normal
Tags: confirmed, patch
Done: Mike Frysinger <vapier <at> gentoo.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Include the full summary of options in the output.
* lib/py-compile: Update usage output.
* t/py-compile-usage.sh: Update test to match new output.
---
lib/py-compile | 8 +++++++-
t/py-compile-usage.sh | 4 ++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/lib/py-compile b/lib/py-compile
index 0597c85b2147..4917cfed008c 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -62,13 +62,19 @@ while test $# -ne 0; do
;;
-h|--help)
cat <<\EOF
-Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..."
+Usage: py-compile [options] FILES...
Byte compile some python scripts FILES. Use --destdir to specify any
leading directory path to the FILES that you don't want to include in the
byte compiled file. Specify --basedir for any additional path information you
do want to be shown in the byte compiled file.
+Options:
+ --basedir DIR Prefix all FILES with DIR, and include in error messages.
+ --destdir DIR Prefix all FILES with DIR before compiling.
+ -v, --version Display version information.
+ -h, --help This help screen.
+
Example:
py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py
diff --git a/t/py-compile-usage.sh b/t/py-compile-usage.sh
index 94c0c4c9d7ba..f324ec9e6d52 100644
--- a/t/py-compile-usage.sh
+++ b/t/py-compile-usage.sh
@@ -29,8 +29,8 @@ cp "$am_scriptdir/py-compile" . \
cat stdout
test -s stderr && { cat stderr >&2; exit 1; }
grep '^Usage: py-compile .' stdout
-$FGREP ' [--basedir DIR]' stdout
-$FGREP ' [--destdir DIR]' stdout
+$FGREP ' --basedir DIR ' stdout
+$FGREP ' --destdir DIR ' stdout
# --version
--
2.34.1
This bug report was last modified 3 years and 84 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.