From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 1 Jun 2025 08:27:26 +0000 (+0200) Subject: [3.13] gh-133503: clarify `compileall -s/-p` docs (GH-134756) (#134996) X-Git-Tag: v3.13.4~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0446628697ca055c47f9ac80cfe91f8f35bf952d;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-133503: clarify `compileall -s/-p` docs (GH-134756) (#134996) gh-133503: clarify `compileall -s/-p` docs (GH-134756) (cherry picked from commit fe6f8a3619242b287a793a5b5d8645f402482c71) Co-authored-by: Rihaan Meher Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- diff --git a/Doc/library/compileall.rst b/Doc/library/compileall.rst index c42288419c4d..ebbbf857e717 100644 --- a/Doc/library/compileall.rst +++ b/Doc/library/compileall.rst @@ -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