PYCOMPILE(1)

πŸ“¦ version 2.7.18, in ubuntu jammy

πŸ’– PYCOMPILE β€” the pycompile(1) glow-up πŸ’–

okay bestie, sit DOWN, because we're talking about pycompile, the manual page from section 1 (general commands, the ones you just... run). she's a little wrapper, she's got range, and she's about to byte-compile ur whole life. let's go 🫢


✨ SYNOPSIS ✨

pycompile [-V [X.Y][-][A.B]] DIR_OR_FILE [-X REGEXPR]

pycompile -p PACKAGE

literally just two ways in. pick ur fighter. πŸ’…


🌸 DESCRIPTION 🌸

so pycompile is a wrapper around the Python standard library's py_compile module, and her whole job is byte-compiling Python files. that's it. that's the gig. she takes ur source and turns it into byte-code. iconic behavior, no notes. ✨


πŸŽ€ OPTIONS πŸŽ€

  • --version β€” shows the program's version number and then dips. bye! πŸ‘‹
  • -h, --help β€” shows this help message and exits. the classic "help me help u" move. πŸ†˜
  • -f, --force β€” forces a rebuild of the byte-code files even if the timestamps are already up-to-date. like, even if it looks fine? yes. rebuild anyway. she said no shortcuts. πŸ”₯
  • -O β€” byte-compile to .pyo files. different file, different vibe. πŸ’œ
  • -q, --quiet β€” be quiet. shhh. 🀫
  • -v, --verbose β€” turn verbose mode on. she's gonna tell u EVERYTHING and honestly? we love a yapper. πŸ—£οΈ
  • *-p *PACKAGE, --package=PACKAGE β€” specify the Debian package name whose files should be bytecompiled. and pro tip: combining this with DIR_OR_FILE will additionally limit the list of files. so it's package + path, both vibing, both filtering. 🎯
  • *-V *VRANGE β€” forces private modules to be bytecompiled with a Python version from the given range, regardless of the default Python version in the system. and if there are no other options? then she'll bytecompile all public modules for the installed Python versions that match the given range. here's what VERSION_RANGE looks like in the wild:
    • 2.5 β€” version 2.5 only
    • 2.5- β€” version 2.5 or newer
    • 2.5-2.7 β€” version 2.5 or 2.6
    • -3.0 β€” all supported 2.X versions
  • *-X *REGEXPR, --exclude=REGEXPR β€” excludes items that match the given REGEXPR. and bestie, u can use this option MULTIPLE times to build up a whole list of things to exclude. stack 'em. go off. 🚫

πŸ‘‘ AUTHOR πŸ‘‘

Piotr OΕΌarowski, 2012-2013. the original main character. we stan. πŸ’–


okay that's the whole page, and yes, we made it to the end πŸ¦‹ this was pycompile, section 1 of the manual, from those golden 2012-2013 days β€” Piotr OΕΌarowski's era, periodt. now go byte-compile something and slay. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from