Skip to content

hatch version doesn't work on a setuptools-scm project unless hatch-vcs is installed #2069

@glyph

Description

@glyph

I get a traceback like this when I try:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/glyph/Library/Application Support/hatch/env/virtual/automat/rI8sZPBT/automat-build/lib/python3.13/site-packages/hatchling/__main__.py", line 6, in <module>
    sys.exit(hatchling())
             ~~~~~~~~~^^
  File "/Users/glyph/Library/Application Support/hatch/env/virtual/automat/rI8sZPBT/automat-build/lib/python3.13/site-packages/hatchling/cli/__init__.py", line 26, in hatchling
    command(**kwargs)
    ~~~~~~~^^^^^^^^^^
  File "/Users/glyph/Library/Application Support/hatch/env/virtual/automat/rI8sZPBT/automat-build/lib/python3.13/site-packages/hatchling/cli/version/__init__.py", line 31, in version_impl
    source = metadata.hatch.version.source
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/Library/Application Support/hatch/env/virtual/automat/rI8sZPBT/automat-build/lib/python3.13/site-packages/hatchling/metadata/core.py", line 1503, in source
    raise UnknownPluginError(message)
hatchling.plugin.exceptions.UnknownPluginError: Unknown version source: vcs

see this conversation glyph/automat@643f7ce#r163303552

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions