Unified build pipeline to produce multiple distribution formats (wheels, Docker images, standalone binaries) from a Python project using a single command.
- Wheel builder (pure-Python preferred; ABI wheels allowed)
- Docker builder (multi-stage with
python:<version>-slimruntime) - Binary builder (PyInstaller backend)
- Plugin system via entry points (
pypackager.builders) - Isolated ephemeral virtualenvs per build target
Planned Phase 2: Linux .deb (via fpm), Homebrew formula, Windows installer (MSI/Inno Setup).
- Linux: Ubuntu 22.04+ (
amd64,arm64) — glibc only - macOS: 13+ (
x86_64,arm64) - Windows: 10+ (
x64) - Python: 3.9 – 3.13
git clone https://github.com/rithwiksb/pypackager
cd pypackager
python -m pip install -e .Run the CLI against a Python project (defaults to current directory):
# Show version
pypackager --version
# Build all default targets (wheel, docker, binary)
pypackager build
# Build only wheels
pypackager build --only wheel
# Use alias
pypack build --only docker --output distOutputs are written under dist/<target>/.
Optional pypackager.toml in the project root:
[pypackager]
targets = ["wheel", "docker", "binary"]
[pypackager.docker]
base_image = "python:3.12-slim"
# Optional: custom entrypoint
# entrypoint = '["python", "-m", "myapp"]'See pypackager.toml.example for full options.
- Scanner: parses PEP 621
pyproject.tomlto obtain name, version, Python requirement, dependencies. - Resolver: writes
pypackager.lockTOML with declared dependencies (MVP); later resolves exact versions via pip. - Environment: builds in per-target ephemeral
venvenvironments. - Pipeline: orchestrates scan → lock → env → builder discovery → build.
- Builders: isolated modules implementing
configure(project_info)andbuild(output_directory). - Plugins: discovered via
importlib.metadata.entry_pointsgrouppypackager.builders.
Issues and pull requests are welcome: https://github.com/rithwiksb/pypackager
MIT License. See LICENSE.