Getting started¶
Build a working EzCompiler setup and compile your first project in a few minutes.
🔧 Prerequisites¶
- Python >= 3.13
- One compilation backend:
cx-freeze,pyinstaller, ornuitka - PyYAML >= 6.0
📝 Steps¶
1. Install EzCompiler¶
2. Install a compilation backend¶
3. Create a configuration¶
from ezcompiler import EzCompiler, CompilerConfig
config = CompilerConfig(
version="1.0.0",
project_name="MyApp",
main_file="main.py", # (1)!
include_files={"files": [], "folders": []},
output_folder="dist",
)
- Path to the main Python entry point of your project.
4. Compile and package¶
ezcompiler = EzCompiler(config)
ezcompiler.compile_project(compiler="PyInstaller") # (1)!
ezcompiler.zip_compiled_project() # (2)!
- Compiles the project to the
output_folder. - Creates a ZIP archive of the compiled output.
✅ Success check
After compile_project() you should see the compiled output in dist/.
After zip_compiled_project() a .zip archive appears alongside it.
5. Publish¶
Publication is a deliberate step of the CLI, never of the Python API:
# Publication is a separate CLI step: it reads your ezcompiler.yaml / pyproject.toml
ezcompiler publish release --release-destination disk --destination ./releases
The command copies the archive to ./releases/release/. To publish a GitHub
Release instead, see publish release.
✅ What you built¶
You now have a compiled, archived, and published Python project. EzCompiler compiled and packaged it through a typed API, then published it through the CLI.