Skip to content

Commit fe6f8a3

Browse files
sharktidepicnixz
andauthored
gh-133503: clarify compileall -s/-p docs (#134756)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent 965c480 commit fe6f8a3

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Doc/library/compileall.rst

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,18 @@ compile Python sources.
5656
executed.
5757

5858
.. option:: -s strip_prefix
59+
60+
Remove the given prefix from paths recorded in the ``.pyc`` files.
61+
Paths are made relative to the prefix.
62+
63+
This option can be used with ``-p`` but not with ``-d``.
64+
5965
.. option:: -p prepend_prefix
6066

61-
Remove (``-s``) or append (``-p``) the given prefix of paths
62-
recorded in the ``.pyc`` files.
63-
Cannot be combined with ``-d``.
67+
Prepend the given prefix to paths recorded in the ``.pyc`` files.
68+
Use ``-p /`` to make the paths absolute.
69+
70+
This option can be used with ``-s`` but not with ``-d``.
6471

6572
.. option:: -x regex
6673

0 commit comments

Comments
 (0)