@@ -26,74 +26,74 @@ compile Python sources.
26
26
27
27
.. program :: compileall
28
28
29
- .. cmdoption :: directory ...
30
- file ...
29
+ .. option :: directory ...
30
+ file ...
31
31
32
32
Positional arguments are files to compile or directories that contain
33
33
source files, traversed recursively. If no argument is given, behave as if
34
34
the command line was :samp: `-l { <directories from sys.path> } `.
35
35
36
- .. cmdoption :: -l
36
+ .. option :: -l
37
37
38
38
Do not recurse into subdirectories, only compile source code files directly
39
39
contained in the named or implied directories.
40
40
41
- .. cmdoption :: -f
41
+ .. option :: -f
42
42
43
43
Force rebuild even if timestamps are up-to-date.
44
44
45
- .. cmdoption :: -q
45
+ .. option :: -q
46
46
47
47
Do not print the list of files compiled. If passed once, error messages will
48
48
still be printed. If passed twice (``-qq ``), all output is suppressed.
49
49
50
- .. cmdoption :: -d destdir
50
+ .. option :: -d destdir
51
51
52
52
Directory prepended to the path to each file being compiled. This will
53
53
appear in compilation time tracebacks, and is also compiled in to the
54
54
byte-code file, where it will be used in tracebacks and other messages in
55
55
cases where the source file does not exist at the time the byte-code file is
56
56
executed.
57
57
58
- .. cmdoption :: -s strip_prefix
59
- .. cmdoption :: -p prepend_prefix
58
+ .. option :: -s strip_prefix
59
+ .. option :: -p prepend_prefix
60
60
61
61
Remove (``-s ``) or append (``-p ``) the given prefix of paths
62
62
recorded in the ``.pyc `` files.
63
63
Cannot be combined with ``-d ``.
64
64
65
- .. cmdoption :: -x regex
65
+ .. option :: -x regex
66
66
67
67
regex is used to search the full path to each file considered for
68
68
compilation, and if the regex produces a match, the file is skipped.
69
69
70
- .. cmdoption :: -i list
70
+ .. option :: -i list
71
71
72
72
Read the file ``list `` and add each line that it contains to the list of
73
73
files and directories to compile. If ``list `` is ``- ``, read lines from
74
74
``stdin ``.
75
75
76
- .. cmdoption :: -b
76
+ .. option :: -b
77
77
78
78
Write the byte-code files to their legacy locations and names, which may
79
79
overwrite byte-code files created by another version of Python. The default
80
80
is to write files to their :pep: `3147 ` locations and names, which allows
81
81
byte-code files from multiple versions of Python to coexist.
82
82
83
- .. cmdoption :: -r
83
+ .. option :: -r
84
84
85
85
Control the maximum recursion level for subdirectories.
86
86
If this is given, then ``-l `` option will not be taken into account.
87
87
:program: `python -m compileall <directory> -r 0 ` is equivalent to
88
88
:program: `python -m compileall <directory> -l `.
89
89
90
- .. cmdoption :: -j N
90
+ .. option :: -j N
91
91
92
92
Use *N * workers to compile the files within the given directory.
93
93
If ``0 `` is used, then the result of :func: `os.process_cpu_count() `
94
94
will be used.
95
95
96
- .. cmdoption :: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
96
+ .. option :: --invalidation-mode [timestamp|checked-hash|unchecked-hash]
97
97
98
98
Control how the generated byte-code files are invalidated at runtime.
99
99
The ``timestamp `` value, means that ``.pyc `` files with the source timestamp
@@ -106,17 +106,17 @@ compile Python sources.
106
106
variable is not set, and ``checked-hash `` if the ``SOURCE_DATE_EPOCH ``
107
107
environment variable is set.
108
108
109
- .. cmdoption :: -o level
109
+ .. option :: -o level
110
110
111
111
Compile with the given optimization level. May be used multiple times
112
112
to compile for multiple levels at a time (for example,
113
113
``compileall -o 1 -o 2 ``).
114
114
115
- .. cmdoption :: -e dir
115
+ .. option :: -e dir
116
116
117
117
Ignore symlinks pointing outside the given directory.
118
118
119
- .. cmdoption :: --hardlink-dupes
119
+ .. option :: --hardlink-dupes
120
120
121
121
If two ``.pyc `` files with different optimization level have
122
122
the same content, use hard links to consolidate duplicate files.
0 commit comments