• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:quiet

1 """Module/script to byte-compile all .py files to .pyc files.
4 given as arguments recursively; the -l option prevents it from
9 packages -- for now, you'll have to deal with packages separately.)
11 See module py_compile for details of the actual byte-compilation.
23 def _walk_dir(dir, ddir=None, maxlevels=10, quiet=0): argument
24 if quiet < 2 and isinstance(dir, os.PathLike):
26 if not quiet:
31 if quiet < 2:
48 maxlevels=maxlevels - 1, quiet=quiet)
51 quiet=0, legacy=False, optimize=-1, workers=1, argument
53 """Byte-compile all modules in the given directory tree.
57 dir: the directory to byte-compile
60 file as it is compiled into each byte-code file.
61 force: if True, force compilation, even if timestamps are up-to-date
62 quiet: full output with False or 0, errors only with 1,
65 optimize: optimization level or -1 for level of the interpreter
67 invalidation_mode: how the up-to-dateness of the pyc will be checked
80 files = _walk_dir(dir, quiet=quiet, maxlevels=maxlevels,
88 rx=rx, quiet=quiet,
96 if not compile_file(file, ddir, force, rx, quiet,
101 def compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, argument
102 legacy=False, optimize=-1,
104 """Byte-compile one file.
108 fullname: the file to byte-compile
110 byte-code file.
111 force: if True, force compilation, even if timestamps are up-to-date
112 quiet: full output with False or 0, errors only with 1,
115 optimize: optimization level or -1 for level of the interpreter
116 invalidation_mode: how the up-to-dateness of the pyc will be checked
119 if quiet < 2 and isinstance(fullname, os.PathLike):
141 head, tail = name[:-3], name[-3:]
154 if not quiet:
162 if quiet >= 2:
164 elif quiet:
168 # escape non-printable characters in msg
175 if quiet >= 2:
177 elif quiet:
187 def compile_path(skip_curdir=1, maxlevels=0, force=False, quiet=0, argument
188 legacy=False, optimize=-1,
190 """Byte-compile all module on sys.path.
197 quiet: as for compile_dir() (default 0)
199 optimize: as for compile_dir() (default -1)
205 if quiet < 2:
213 quiet=quiet,
227 parser.add_argument('-l', action='store_const', const=0,
230 parser.add_argument('-r', type=int, dest='recursion',
232 'if `-l` and `-r` options are specified, '
233 'then `-r` takes precedence.'))
234 parser.add_argument('-f', action='store_true', dest='force',
236 parser.add_argument('-q', action='count', dest='quiet', default=0,
237 help='output only error messages; -qq will suppress '
239 parser.add_argument('-b', action='store_true', dest='legacy',
240 help='use legacy (pre-PEP3147) compiled file locations')
241 parser.add_argument('-d', metavar='DESTDIR', dest='ddir', default=None,
243 'compile-time tracebacks and in runtime '
246 parser.add_argument('-x', metavar='REGEXP', dest='rx', default=None,
250 parser.add_argument('-i', metavar='FILE', dest='flist',
253 'if "-", names are read from stdin'))
257 'to the equivalent of -l sys.path'))
258 parser.add_argument('-j', '--workers', default=1,
260 invalidation_modes = [mode.name.lower().replace('_', '-')
262 parser.add_argument('--invalidation-mode',
265 '"checked-hash" if the SOURCE_DATE_EPOCH '
285 with (sys.stdin if args.flist=='-' else open(args.flist)) as f:
289 if args.quiet < 2:
297 ivl_mode = args.invalidation_mode.replace('-', '_').upper()
308 args.quiet, args.legacy,
313 args.force, args.rx, args.quiet,
320 quiet=args.quiet,
323 if args.quiet < 2: