{"id":9408,"library":"whool","title":"whool - Odoo Addon Build Backend","description":"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.","status":"active","version":"1.3","language":"en","source_language":"en","source_url":"https://github.com/sbidoul/whool","tags":["odoo","build backend","packaging","wheel","sdist","pyproject.toml"],"install":[{"cmd":"pip install whool","lang":"bash","label":"Install whool"}],"dependencies":[],"imports":[],"quickstart":{"code":"# Create a dummy Odoo addon structure\nmkdir my_odoo_addon\ncd my_odoo_addon\n\n# Create a minimal Odoo __manifest__.py (required by Odoo)\nwith open(\"__init__.py\", \"w\") as f:\n    f.write(\"__manifest__ = {'name': 'My Test Addon', 'version': '1.0.0', 'installable': True}\")\nmkdir models\nwith open(\"models/__init__.py\", \"w\") as f:\n    f.write(\"\")\n\n# Initialize whool configuration (generates pyproject.toml)\nimport subprocess\nsubprocess.run([\"whool\", \"init\"], check=True)\n\n# Build the package (sdist and wheel)\nsubprocess.run([\"python\", \"-m\", \"build\"], check=True)\n\nprint(\"\\nSuccessfully built package in 'dist/' directory:\")\nimport os\nprint(os.listdir('dist'))","lang":"python","description":"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."},"warnings":[{"fix":"Remove usages of the `whool dependencies` command and update any custom code that interacted with `whool`'s previous internal `wheel` API usage. Consider `pyproject-dependencies` for dependency listing.","message":"The `dependencies` command was removed in v0.3, and `whool` stopped using internal `wheel` APIs. Code or scripts relying on this command or custom integrations with old `wheel` APIs will break.","severity":"breaking","affected_versions":"<0.3 to >=0.3"},{"fix":"Update CI/CD pipelines or scripts that expect specific, non-normalized filenames for built distributions. Test builds to ensure compatibility with downstream systems.","message":"Wheel and sdist names are normalized for better standard compliance, especially for addon names containing uppercase letters. This might subtly change output filenames for existing projects.","severity":"gotcha","affected_versions":">=1.3"},{"fix":"Ensure `git` is installed and the build is performed within a git repository for accurate file inclusion based on `.gitignore`. If `git` is intentionally absent, carefully manage included files via `pyproject.toml` or other packaging mechanisms.","message":"When the `git` command is not available, `whool` copies all files to the distribution, potentially including unwanted files not covered by `.gitignore` rules, instead of relying on `git` for file selection. This can lead to larger or incorrect distributions.","severity":"gotcha","affected_versions":">=1.2"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure `whool` is installed: `pip install whool`. If installed in a virtual environment, activate it or use `python -m whool`.","cause":"`whool` is not installed or not in your system's PATH.","error":"whool: command not found"},{"fix":"Remove calls to `whool dependencies` from your scripts. For listing dependencies, consider using other tools like `pyproject-dependencies`.","cause":"You are using a `whool` version (0.3 or newer) that no longer supports the `dependencies` command, but your script or workflow is still trying to use it.","error":"Error: \"dependencies\" command has been removed"},{"fix":"Run `whool init` in your project directory to generate the necessary `pyproject.toml` file.","cause":"`whool` requires a `pyproject.toml` file in the project root to configure the build process, which is typically generated by `whool init`.","error":"No such file or directory: 'pyproject.toml'"}]}