If I try to build a package with dynamic versioning then it will fail because it setuptools-scm is not able to find .git directory
LookupError: Error getting the version from source `vcs`: setuptools-scm was unable to detect version for /some/path/package1.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
Consider this config in the pyproject.toml:
and such source tree:
If I try to build a package with dynamic versioning then it will fail because it
setuptools-scm
is not able to find.git
directoryIt happens due to this line https://github.com/ofek/hatch-vcs/blob/388c947133061a2056de9fe2f1102685a648f248/hatch_vcs/version_source.py#L56. I'm not sure what 's the intention of this but this prevents to work with projects where
pyproject.toml
is not located in the same directory with.git
.