whool - Odoo Addon Build Backend

1.3 · active · verified Thu Apr 16

whool is a build backend for Odoo addons, allowing them to be packaged and distributed as standard Python wheels and sdists. It leverages `pyproject.toml` for configuration and integrates with standard build tools like `pip` and `build`. The current version is 1.3, with releases occurring every few months to add features and improve compliance.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates how to use `whool` to initialize and build a simple Odoo addon into a standard Python wheel and sdist. It assumes `whool` and `build` (for `python -m build`) are installed.

# Create a dummy Odoo addon structure
mkdir my_odoo_addon
cd my_odoo_addon

# Create a minimal Odoo __manifest__.py (required by Odoo)
with open("__init__.py", "w") as f:
    f.write("__manifest__ = {'name': 'My Test Addon', 'version': '1.0.0', 'installable': True}")
mkdir models
with open("models/__init__.py", "w") as f:
    f.write("")

# Initialize whool configuration (generates pyproject.toml)
import subprocess
subprocess.run(["whool", "init"], check=True)

# Build the package (sdist and wheel)
subprocess.run(["python", "-m", "build"], check=True)

print("\nSuccessfully built package in 'dist/' directory:")
import os
print(os.listdir('dist'))

view raw JSON →