Closed sunpoet closed 1 year ago
I don't want to do this. I would rather submit an issue Upstream, and once they fix it just bump the dependency. That is in essence, just drop support for the older version.
Or just use the classical import names which work on all supported versions
from .version import version
from .version import version_tuple as __version_info__
works for both versions.
Not sure why pre-commit.ci removes "from .version import version" line in https://github.com/platformdirs/platformdirs/commit/bab1568a8ab8b55afb3ed199213cc2dfdb239b27.
Pretty sure pre commit removes it because it's breaking parent package name assignment
I don't want to do this. I would rather submit an issue Upstream, and once they fix it just bump the dependency. That is in essence, just drop support for the older version.
hatch-vcs 0.3.0 depends on setuptools-scm 6.4.0+. Since setuptools-scm 6.x and 7.x generates different version.py (see below), the following error occurs with setuptools-scm 6.x. Therefore, we add a workaround to support both versions.
With setuptools-scm 6.4.2:
With setuptools-scm 7.1.0:
The error without this workaround:
Reference: https://github.com/pypa/setuptools_scm/commit/b45e19f9f275a31873fd5e07faabef16fd0bbec0