CLI Reference¶
build-all-releases¶
You need to have uv installed for this to run.
It will leverage uv to follow this process:
- Inspect the compatible Odoo releases for the addon.
- Build the sdist.
- Build one wheel for each compatible Odoo release.
Arguments¶
<path>(optional): Directory for the module. Defaults to current directory.-s/--start-release(optional): Release to start building wheels for, if Odoo dependency is compatible. Defaults to17.0.-e/--end-release(optional): Release to stop building wheels for, if Odoo dependency is compatible. Defaults to19.0.
Example¶
Let's use one of our provided examples:
polytropos build-all examples/all_togetherBuilding odoo-addon-all-together for Odoo releases...
Building sdist...
Building wheel for Odoo 17.0...
Building wheel for Odoo 18.0...
Building wheel for Odoo 19.0...
Build complete. Files in /path/polytropos/examples/all_together/dist:
.gitignore
all_together-1.0.0.tar.gz
odoo_addon_all_together-17.0.1.0.0-py3-none-any.whl
odoo_addon_all_together-18.0.1.0.0-py3-none-any.whl
odoo_addon_all_together-19.0.1.0.0-py3-none-any.whl
init¶
Initialize a new Polytropos module:
Creates a basic pyproject.toml, .gitignore, and __init__.py for an Odoo module.
Arguments¶
<path>(optional): Directory for the module. Defaults to current directory. The module name is derived from the directory name. Creates the directory if it doesn't exist.
Examples¶
# Initialize in new directory (creates my_module/)
polytropos init my_module
# Initialize in current directory
polytropos init
This creates a pyproject.toml with:
- Build system configured for Polytropos
- Project metadata (name derived from directory, version, description)
- Default Odoo release (19.0) in
[tool.polytropos]
gc¶
Garbage-collect the Polytropos cache:
Without --full, removes broken symlinks from the editable install cache (at most once
per hour). Use this after removing or moving Odoo addon source directories that were
installed as editable.
With --full, deletes the entire Polytropos cache directory (/var/cache/polytropos/
when writable, ~/.cache/polytropos/ otherwise, or $POLYTROPOS_CACHE_DIR if set). Use
this to fully reset all cached state.