skillfed

pyc-wheel

Compile all py files in a wheel to pyc files.

pyc-wheel v2.4.3 213.2K downloads/30d#9,442 on PyPI33
Permissive license MIT Active released

What it is and what it does

pyc_wheel is a command-line tool that processes wheel archives to pre-compile their Python source files into bytecode. It reads a .whl file, compiles all .py modules to .pyc, and rewrites the wheel in place or with optional renaming to indicate the Python version used for compilation. The tool supports selective compilation via regex exclusion patterns and can create backups before modification.

Typical use is in build pipelines where you want to distribute pre-compiled wheels for faster installation or to obfuscate source code. It depends on typing-extensions, setuptools, and pkg-about, and runs on Python 3.11 or higher across CPython, PyPy, and GraalPy. The package is actively maintained and carries no known security vulnerabilities.

Use it for:

  • Pre-compile wheels in CI/CD pipelines to reduce installation time on target systems
  • Distribute bytecode-only wheels to obscure source code while preserving functionality
  • Rename generic py3 wheels to version-specific cp313 wheels after compilation
  • Batch-process multiple wheels with selective file exclusion via regex patterns

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Compiles all Python source files (.py) in a wheel to bytecode (.pyc) files, optionally renaming the wheel to reflect the target Python version.

Yes, if you need to pre-compile wheels in a build pipeline or distribution workflow. Low friction, no vulnerabilities, actively maintained, and permissive license. Not necessary for typical development; primarily a packaging tool for release or deployment automation.

Install

pyc-wheel on PyPI

pip

pip install pyc-wheel

uv

uv add pyc-wheel

poetry

poetry add pyc-wheel

Installing pyc-wheel

Before you install

Low install friction; pure Python wheel with minimal dependencies (typing-extensions, setuptools, pkg-about). Actively maintained with recent release (73 days ago) and no known vulnerabilities.

License in practice

MIT license (permissive) allows commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install pyc-wheel
python3 -m pyc_wheel your_wheel-1.0.0-py3-none-any.whl
# or with renaming:
python3.13 -m pyc_wheel --rename your_wheel-1.0.0-py3-none-any.whl

Requires Python 3.11 or higher; operates on wheel files, not source distributions.

Verify before relying

  • Performance impact of bytecode compilation on wheel size and import speed
  • Compatibility with non-CPython implementations beyond PyPy and GraalPy

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0.0,>=3.11.0)
Install friction low — pure-Python wheel
Runtime dependencies 3 — typing-extensions, setuptools, pkg-about
Maintenance actively maintained — 73 days since the last release
Last repo commit
First released
Downloads 213,152/month — #9,442 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pyc_wheel-2.4.3-py3-none-any.whl

Keywords: pyc_wheel, pycwheel, wheel, pyc, compile

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: PolishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: GraalPyProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: UtilitiesTyping :: Typed

Tags

wheel pyc compilationcompile python wheel bytecodepyc wheel builderwheel optimizationpython bytecode packaging
wheel-packagingbytecode-compilation

More Python Modules packages