Skip to content
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

Error getting the version from source vcs: no such group #795

Closed
KOLANICH opened this issue Mar 26, 2023 · 3 comments
Closed

Error getting the version from source vcs: no such group #795

KOLANICH opened this issue Mar 26, 2023 · 3 comments

Comments

@KOLANICH
Copy link

KOLANICH commented Mar 26, 2023

pip list | grep hatch
hatch-vcs                     0.3.0
hatchling                     1.13.0
git clone https://github.com/tomerfiliba/plumbum
cd plumbum
python3 -m build -nwx
  File "/usr/local/lib/python3.11/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
    main()
  File "/usr/local/lib/python3.11/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
    return _build_backend().build_wheel(wheel_directory, config_settings,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/hatchling/build.py", line 56, in build_wheel
    return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/hatchling/builders/plugin/interface.py", line 93, in build
    self.metadata.validate_fields()
  File "/usr/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 243, in validate_fields
    _ = self.version
        ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 128, in version
    self._version = self._get_version()
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 226, in _get_version
    version = self.hatch.version.cached
              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/hatchling/metadata/core.py", line 1412, in cached
    raise type(e)(message) from None
IndexError: Error getting the version from source `vcs`: no such group

@ofek
Copy link
Sponsor Collaborator

ofek commented Mar 27, 2023

~\Desktop ddev{repo: core, org: staging}
❯ git clone -q https://github.com/tomerfiliba/plumbum

~\Desktop ddev{repo: core, org: staging}
❯ cd plumbum

…\plumbum on  master via  v3.8.1
❯ python -m pip freeze | rg hatch
hatch-vcs==0.3.0
hatchling==1.11.1

…\plumbum on  master via  v3.8.1
❯ python -m build -nwx
* Building wheel...
Successfully built plumbum-1.8.2.dev11+g9a9ad92-py3-none-any.whl

@KOLANICH
Copy link
Author

KOLANICH commented Apr 26, 2023

Thanks for looking into it. I have finally found time to check this. This was caused by the changes in setuptools_scm.

It may make sense to test hatch_vcs against each commit in master of setuptools_scm, since hatch_vcs depends on setuptools_scm and each regression in it affects hatch_vcs users.

@ofek
Copy link
Sponsor Collaborator

ofek commented Apr 26, 2023

oh okay, thanks for following up!

tatokis added a commit to tatokis/python-bootstrap that referenced this issue Jan 13, 2024
Needed to work around pypa/hatch#795
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

2 participants