Skip to content

bug: ValueError when adding a odoo-addon #25

@bosd

Description

@bosd

Steps to reproduce:

Replicate demo project 4, bu using this toml file:
https://github.com/acsone/hatch-odoo/blob/main/tests/data/project4/pyproject.toml

uv add odoo-addon-web_responsive

result:

warning: No `requires-python` value found in the workspace. Defaulting to `>=3.10`.
  × Failed to build `project4 @ file:///home/bosd/git//project4`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `hatchling.build.build_editable` failed (exit status: 1)

      [stderr]
      Traceback (most recent call last):
        File "<string>", line 11, in <module>
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatchling/build.py", line 83, in build_editable
          return os.path.basename(next(builder.build(directory=wheel_directory, versions=['editable'])))
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line
      90, in build
          self.metadata.validate_fields()
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatchling/metadata/core.py", line 265, in
      validate_fields
          _ = self.version
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatchling/metadata/core.py", line 149, in
      version
          self._version = self._get_version()
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatchling/metadata/core.py", line 244, in
      _get_version
          core_metadata = self.core
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatchling/metadata/core.py", line 196, in core
          metadata_hook.update(self.core_raw_metadata)
        File "/home/bosd/.cache/uv/builds-v0/.tmpNvLvxP/lib/python3.10/site-packages/hatch_odoo/metadata_hook.py", line 55, in update
          raise ValueError(
      ValueError: 'dependencies' may not be listed in the 'project' table when using hatch-odoo to populate dependencies
      from Odoo addons manifests. If you need to add dependencies that are not in Odoo addons manifests, please use the
      'tools.hatch-odoo.dependencies' key.

      hint: This usually indicates a problem with the package or the build environment.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions