]> granicus.if.org Git - python/commit
bpo-38112: Compileall improvements (GH-16012)
authorLumír 'Frenzy' Balhar <frenzy.madness@gmail.com>
Thu, 26 Sep 2019 06:28:26 +0000 (08:28 +0200)
committerPetr Viktorin <encukou@gmail.com>
Thu, 26 Sep 2019 06:28:26 +0000 (08:28 +0200)
commit8e7bb991de7c88583bc6663d8bbc541054ca8dc4
tree86735266d142f3ab044219796ca1ad5400b72606
parent52b940803860e37bcc3f6096b2d24e7c20a0e807
bpo-38112: Compileall improvements (GH-16012)

* Raise the limit of maximum path depth to actual  recursion limit

* Add posibilities to adjust a path compiled in .pyc  file.

Now, you can:
- Strip a part of path from a beggining of path into compiled file
   example "-s /test /test/build/real/test.py" → "build/real/test.py"
- Append some new path to a beggining of path into compiled file
   example "-p /boo real/test.py" → "/boo/real/test.py"

You can also use both options in the same time. In that case,
striping is done before appending.

* Add a possibility to specify multiple optimization levels

Each optimization level then leads to separated compiled file.
Use `action='append'` instead of `nargs='+'` for the -o option.
Instead of `-o 0 1 2`, specify `-o 0 -o 1 -o 2`. It's more to type,
but much more explicit.

* Add a symlinks limitation feature

This feature allows us to limit byte-compilation of symbolic
links if they are pointing outside specified dir (build root
for example).
Doc/library/compileall.rst
Lib/compileall.py
Lib/test/test_compileall.py
Misc/NEWS.d/next/Library/2019-09-24-10-55-01.bpo-38112.2EinX9.rst [new file with mode: 0644]