]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-133503: clarify `compileall -s/-p` docs (#134756)
authorRihaan Meher <meherrihaan@gmail.com>
Sun, 1 Jun 2025 08:18:31 +0000 (04:18 -0400)
committerGitHub <noreply@github.com>
Sun, 1 Jun 2025 08:18:31 +0000 (10:18 +0200)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Doc/library/compileall.rst

index c42288419c4d2dc89d156c8eb9fa977fd1a605e9..ebbbf857e717a4f65b2fad2ffad92695cac0a1ca 100644 (file)
@@ -56,11 +56,18 @@ compile Python sources.
    executed.
 
 .. option:: -s strip_prefix
+
+   Remove the given prefix from paths recorded in the ``.pyc`` files.
+   Paths are made relative to the prefix.
+
+   This option can be used with ``-p`` but not with ``-d``.
+
 .. option:: -p prepend_prefix
 
-   Remove (``-s``) or append (``-p``) the given prefix of paths
-   recorded in the ``.pyc`` files.
-   Cannot be combined with ``-d``.
+   Prepend the given prefix to paths recorded in the ``.pyc`` files.
+   Use ``-p /`` to make the paths absolute.
+
+   This option can be used with ``-s`` but not with ``-d``.
 
 .. option:: -x regex