whool - build backend for Odoo addons
Maintained. Last release 7 weeks ago, commits in 4 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install whoolwhool
A standards-compliant Python build backend to package individual Odoo addons.
[!NOTE] If you are looking at packaging a customer project or a collection of addons, you may want to consider the hatch-odoo project.
Quick start
Create a file named pyproject.toml next to the addon's __manifest__.py with the
following content:
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
💡 you can use the
pipx run whool initcommand to do that.
When that is done you can work with the addon as any regular python project. Notably
pipx run build --wheel --outdir /tmp/dist/orpip wheel --no-deps --wheel-dir /tmp/dist/ .will create a wheel.- Assuming
odoohas been installed with pip in the current Python environment (for instance withpip install --editable ./odoo),pip install --editable .will install the addon and its dependencies (which it will pull from PyPI) and make it available in the Odoo addons path without the need to modify Odoo's--addons-pathoption.
Files included in the distribution packages
whool will package all the files that are under git control and ignore everything
else.
📝 TODO: explain what is included in a sdist vs wheel, and how building from a sdist works.
Version number of the generated packages
The version of the generated distribution packages is influenced by the git
commit history in the following way.
📝 TODO: elaborate (see setuptools-odoo docs in the meantime)
Configuration
The following options can be set in pyproject.toml:
📝 TODO: explain this (see setuptools-odoo docs in the meantime)
[tool.whool]
depends_override = {}
external_dependencies_override = {}
additional_dependencies = []
post_version_strategy_override = "..."
odoo_series_override = "..."
If set, the following environment variables override the corresponding pyproject.toml
options:
WHOOL_POST_VERSION_STRATEGY_OVERRIDE