Skip to content

Call to hatchling.build.prepare_metadata_for_build_editable failed #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
OvO616 opened this issue May 8, 2025 · 0 comments
Open

Call to hatchling.build.prepare_metadata_for_build_editable failed #660

OvO616 opened this issue May 8, 2025 · 0 comments

Comments

@OvO616
Copy link

OvO616 commented May 8, 2025

uv add "mcp[cli]" httpx
warning: VIRTUAL_ENV=.venv does not match the project environment path /home/liuxl/moxing/mcp/.venv and will be ignored; use --active to target the active environment instead
× Failed to build mcp @ file:///home/liuxl/moxing/mcp
├─▶ The build backend returned an error
╰─▶ Call to hatchling.build.prepare_metadata_for_build_editable failed (exit status: 1)

  [stderr]
  Traceback (most recent call last):
    File "<string>", line 14, in <module>
    File "/home/liuxl/.cache/uv/builds-v0/.tmpm9yiwU/lib/python3.10/site-packages/hatchling/build.py", line 133, in prepare_metadata_for_build_editable
      directory = os.path.join(metadata_directory, f'{builder.artifact_project_id}.dist-info')
    File "/home/liuxl/.cache/uv/builds-v0/.tmpm9yiwU/lib/python3.10/site-packages/hatchling/builders/wheel.py", line 815, in artifact_project_id
      self.project_id
    File "/home/liuxl/.cache/uv/builds-v0/.tmpm9yiwU/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 374, in project_id
      self.__project_id = f'{self.normalize_file_name_component(self.metadata.core.name)}-{self.metadata.version}'
    File "/home/liuxl/.cache/uv/builds-v0/.tmpm9yiwU/lib/python3.10/site-packages/hatchling/metadata/core.py", line 149, in version
      self._version = self._get_version()
    File "/home/liuxl/.cache/uv/builds-v0/.tmpm9yiwU/lib/python3.10/site-packages/hatchling/metadata/core.py", line 248, in _get_version
      version = self.hatch.version.cached
    File "/home/liuxl/.cache/uv/builds-v0/.tmpm9yiwU/lib/python3.10/site-packages/hatchling/metadata/core.py", line 1456, in cached
      raise type(e)(message) from None
  RuntimeError: Error getting the version from source `uv-dynamic-versioning`: This does not appear to be a Git project

  hint: This usually indicates a problem with the package or the build environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant