• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:control +full:- +full:regex

1 :mod:`compileall` --- Byte-compile Python libraries
5 :synopsis: Tools for byte-compiling all Python source files in a directory tree.
9 --------------
13 This module can be used to create the cached byte-code files at library
18 Command-line use
19 ----------------
21 This module can work as a script (using :program:`python -m compileall`) to
30 source files, traversed recursively. If no argument is given, behave as if
31 the command line was ``-l <directories from sys.path>``.
33 .. cmdoption:: -l
38 .. cmdoption:: -f
40 Force rebuild even if timestamps are up-to-date.
42 .. cmdoption:: -q
45 still be printed. If passed twice (``-qq``), all output is suppressed.
47 .. cmdoption:: -d destdir
51 byte-code file, where it will be used in tracebacks and other messages in
52 cases where the source file does not exist at the time the byte-code file is
55 .. cmdoption:: -s strip_prefix
56 .. cmdoption:: -p prepend_prefix
58 Remove (``-s``) or append (``-p``) the given prefix of paths
60 Cannot be combined with ``-d``.
62 .. cmdoption:: -x regex
64 regex is used to search the full path to each file considered for
65 compilation, and if the regex produces a match, the file is skipped.
67 .. cmdoption:: -i list
70 files and directories to compile. If ``list`` is ``-``, read lines from
73 .. cmdoption:: -b
75 Write the byte-code files to their legacy locations and names, which may
76 overwrite byte-code files created by another version of Python. The default
78 byte-code files from multiple versions of Python to coexist.
80 .. cmdoption:: -r
82 Control the maximum recursion level for subdirectories.
83 If this is given, then ``-l`` option will not be taken into account.
84 :program:`python -m compileall <directory> -r 0` is equivalent to
85 :program:`python -m compileall <directory> -l`.
87 .. cmdoption:: -j N
93 .. cmdoption:: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
95 Control how the generated byte-code files are invalidated at runtime.
97 and size embedded will be generated. The ``checked-hash`` and
98 ``unchecked-hash`` values cause hash-based pycs to be generated. Hash-based
100 :ref:`pyc-invalidation` for more information on how Python validates
103 variable is not set, and ``checked-hash`` if the ``SOURCE_DATE_EPOCH``
106 .. cmdoption:: -o level
110 ``compileall -o 1 -o 2``).
112 .. cmdoption:: -e dir
116 .. cmdoption:: --hardlink-dupes
122 Added the ``-i``, ``-b`` and ``-h`` options.
125 Added the ``-j``, ``-r``, and ``-qq`` options. ``-q`` option
126 was changed to a multilevel value. ``-b`` will always produce a
127 byte-code file ending in ``.pyc``, never ``.pyo``.
130 Added the ``--invalidation-mode`` option.
133 Added the ``-s``, ``-p``, ``-e`` and ``--hardlink-dupes`` options.
136 Added the possibility to specify the ``-o`` option multiple times.
139 There is no command-line option to control the optimization level used by the
141 provides the option: :program:`python -O -m compileall`.
149 ----------------
151 …onlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalid…
162 byte-code file, where it will be used in tracebacks and other messages in
163 cases where the source file does not exist at the time the byte-code file is
166 If *force* is true, modules are re-compiled even if the timestamps are up to
172 given as a :ref:`re.Pattern <re-objects>` object.
178 If *legacy* is true, byte-code files are written to their legacy locations
179 and names, which may overwrite byte-code files created by another version of
181 names, which allows byte-code files from multiple versions of Python to
185 the built-in :func:`compile` function. Accepts also a sequence of optimization
200 the ``-s``, ``-p`` and ``-e`` options described above.
217 no matter what the value of *optimize* is.
220 Accepts a :term:`path-like object`.
235 …(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=…
242 byte-code file, where it will be used in tracebacks and other messages in
243 cases where the source file does not exist at the time the byte-code file is
249 a regular expression, given as a :ref:`re.Pattern <re-objects>` object.
255 If *legacy* is true, byte-code files are written to their legacy locations
256 and names, which may overwrite byte-code files created by another version of
258 names, which allows byte-code files from multiple versions of Python to
262 the built-in :func:`compile` function. Accepts also a sequence of optimization
270 the ``-s``, ``-p`` and ``-e`` options described above.
283 no matter what the value of *optimize* is.
294 …skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=…
296 Byte-compile all the :file:`.py` files found along ``sys.path``. Return a
312 no matter what the value of *optimize* is.
338 Byte-compile a single source file.