-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
SETUPTOOLS_SCM_PRETEND_VERSION: parse node & distance #1059
Comments
- work-around for pypa/setuptools-scm#1059
pretend_version currently has no scm metadata avaliable, its a string and not turned back into a scm_version - there should be warnings |
- work-around for pypa/setuptools-scm#1059
ok, FYI I'm using this work-around: [tool.setuptools_scm]
version_file_template = """
version = '{version}'
commit_hash = '{scm_version.node}'
distance = {scm_version.distance}
# work-around for https://github.com/pypa/setuptools_scm/issues/1059
if (commit_hash, distance) == ('None', 0):
import re
if (_v := re.search(r'\\.dev(\\d+)\\+(\\w+)', version)):
distance, commit_hash = int(_v.group(1)), _v.group(2)
""" |
I think I need to introduce a mechanism to provide scm version metadata |
Perhaps adding e.g. |
adding those to the tag regex will do no good instead good default overrides as well as a utility helper to create the overrides from forge metadata will be required |
you mean you'd prefer |
The idea would be to inject a toml mapping with the metadata |
- work-around for pypa/setuptools-scm#1059
pyproject.toml
config:build:
output:
It's odd that
version
is correctly parsed intoversion_tuple
but notscm_version.node
norscm_version.distance
.The text was updated successfully, but these errors were encountered: