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