= Optionnal Dependencies - Extra

There 2 ways to declare optionnaldependencies:

. `[project.optional-dependencies]` in `pyproject.toml`
. `[tool.addon-odoo-wheel.optional-dependencies]` in `pyproject.toml`

CAUTION: {page-component-name} will look in that order and stop at the first one found.

IMPORTANT: You can't use more than one option, an error will occur in that case.

In that case the wheel will contain dependencies with extras

.Wheel Metadata
[,text]
----
Requires-Dist = "httpx>=0.28"
Provides-Extra = "test"
Requires-Dist = "pytest; extra == test"
----

== With `[project.optional-dependencies]`

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

[project]
name = "my-awesome-odoo-module"
dynamic = ["version"]
dependencies = [
    "httpx>=0.28",
]
[project.optional-dependencies]
test = [
    "pytest",
]
----

== With `[tool.addon-odoo-wheel.optional-dependencies]`

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

[tool.addon-odoo-wheel]
dependencies = [
    "httpx>=0.28",
]
[tool.addon-odoo-wheel.optional-dependencies]
test = [
    "pytest",
]
----
