Metadata-Version: 2.5
Name: addon-odoo-wheel
Version: 0.7.0
Summary: Generic and simple build backend for a single Odoo addon
Project-URL: Homepage, https://gitlab.mangono.io/python-libs/addon-odoo-wheel
Project-URL: Source, https://gitlab.mangono.io/python-libs/addon-odoo-wheel
Project-URL: Tracker, https://gitlab.mangono.io/python-libs/addon-odoo-wheel/-/issues
Author-email: Alexis Pasquier <alexis.pasquier@mangono.fr>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Odoo
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.8
Requires-Dist: importlib-metadata>=6.8.0
Requires-Dist: manifestoo-core>=1.16
Requires-Dist: packaging
Requires-Dist: tomli; python_version < '3.11'
Requires-Dist: typing-extensions>=4.7.1
Requires-Dist: wheel
Description-Content-Type: text/markdown

# Addon Odoo Wheel Builder

A standards-compliant Python build backend to package individual Odoo addons.
The main idea and the code is taken from [sbidoul/whool](https://github.com/sbidoul/whool).

## Quick Usage

```toml
[build-system]
requires = ["addon-odoo-wheel"]
build-backend = "addon_odoo_wheel.builder"
```

This config will produce a wheel and the module will be available in the `odoo/addons` namespace.

## Auto patch

`addon-odoo-wheel next-version <addon>` prints the version of the next release from the releases on PyPI
(manifest `20.0.1.1` → `20.0.1.1.0`, `20.0.1.1.1`…, always 5 digits; 6 digits as whool with `auto_patch_append`), nothing when the content of the addon is already published.
`ADDON_ODOO_WHEEL_VERSION` builds with this version, Odoo still sees the manifest version (no module update).
The CI components enable it with `auto_patch: true`, see `modules/ROOT/pages/version.adoc`.
`addon-odoo-wheel plan <root>` lists the addons of a repository to publish: the `publish-repo` component
publishes them with one build job, see `modules/ROOT/pages/ci.adoc`.

## Change the manifest version

`addon-odoo-wheel version [--bump major|minor|patch] [<value>]` reads or changes the version of the manifest,
as `uv version` does for `pyproject.toml` (`--dry-run`, `--short`); the Odoo series is kept.
`--remote` shows the last version published on PyPI (ahead of the manifest with auto patch).

## Documentation

The complete documentation (package name, version, auto patch, CI components, dependencies, project URLs, editable install, contributors)
is in [`modules/ROOT/pages`](https://gitlab.mangono.io/python-libs/addon-odoo-wheel/-/tree/main/modules/ROOT/pages).

## Contributors

A contributor sets the package prefix, author email, default website and classifiers of the addons
whose `__manifest__.py` `author` matches one of its `names`.
The known contributors (OCA, Mangono, Odoo) are in `src/addon_odoo_wheel/contributors.py`.

To register your company, subclass `ContributorABC` in your own package and declare it as an
`addon_odoo_wheel.contributor` entry point:

```python
from addon_odoo_wheel.contributors_api import ContributorABC, OdooSeries


class MyCompanyContributor(ContributorABC):
    names = ["My Company"]  # every `author` value used by your company, case insensitive

    def get_mail(self, odoo_series: OdooSeries | None) -> str | None:
        return "contact@my-company.com"

    def get_website(self, odoo_series: OdooSeries | None) -> str | None:
        return "https://my-company.com"

    def get_package_prefix(self, odoo_series: OdooSeries | None) -> str | None:
        return "my-company-addon"
```

```toml
[project.entry-points."addon_odoo_wheel.contributor"]
my-company = "my_company_package:MyCompanyContributor"
```

See `modules/ROOT/pages/contributors.adoc` for the full example.
