Skip to content

madengine install fails (metadata-generation-failed): duplicate test_echo.sh rejected by Hatchling >=1.19 #162

@mcheepa-prof

Description

@mcheepa-prof

Summary

Installing the dependencies in requirements.txt fails because madengine (pinned to git+https://github.com/ROCm/madengine.git@main) cannot build its wheel. Hatchling >= 1.19 rejects a duplicate file path in the wheel archive, so metadata generation fails and madengine never installs.

This breaks any flow that does pip install -r requirements.txt from MAD (e.g. the mad_venv setup), and downstream the madengine CLI ends up "command not found".

Environment

  • MAD branch: develop
  • madengine: main (also reproduced on tags v2.1.0, v2.0.3)
  • Python: 3.12
  • pip: 24.0
  • Hatchling: >= 1.19 (whatever build isolation pulls in)

Steps to reproduce

python3 -m venv /tmp/probe && . /tmp/probe/bin/activate
pip install --upgrade pip
pip install "git+https://github.com/ROCm/madengine.git@main"

ValueError: A second file is being added to the wheel archive at the same path: `madengine/scripts/common/test_echo.sh`.
error: metadata-generation-failed

Root cause
madengine's packaging includes madengine/scripts/common/test_echo.sh twice in the wheel (normal inclusion + force-include/artifacts). Hatchling < 1.19 silently allowed duplicate archive paths; Hatchling >= 1.19 errors. So the failure is driven by the Hatchling version, not the madengine tag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions