⚠️ Until now we were creating packages using setuptools-odoo, the library is being deprecated so the recommended tools to work are the following:
You will need a pyenv with a python version >=3.10 with the following dependencies:
pip install whool
pip install twine
python3 -m pip install --upgrade build
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"
In order to be able to publish your addon later on, the pyproject.toml file must be commited.
When that is done you can work with the addon as any regular python project.
Create the dist folder by executing the build command:
python -m build
Publish with twine:
twine upload dist/*