Generates a version string from VCS state.
Uses a constrained but useful subset of the full functionality of setuptools_scm (https://github.com/pypa/setuptools_scm). These constraints avoid pitfalls in the interaction of setuptools_scm with Pants's hermetic environments.
In particular, we ignore any existing setuptools_scm config. Instead you must provide a subset of that config in this target's fields.
If you need functionality that is not currently exposed here, please reach out to us at https://www.pantsbuild.org/community/getting-help.
Backend: pants.backend.experimental.python
generate_to
str
requiredGenerate the version data to this relative path, using the template field.
Note that the generated output will not be written to disk in the source tree, but will be available as a generated dependency to code that depends on this target.
template
str
requiredGenerate the version data using this format string, which takes a version format kwarg.
E.g., 'version = "{version}"'
description
str | None
default: None
A human-readable description of the target.
Use pants list --documented ::
to see all targets with descriptions.
local_scheme
python_resolve
str | None
default: None
backend: pants.backend.experimental.python
The resolve from [python].resolves
to use.
If not defined, will default to [python].default_resolve
.
All dependencies must share the same value for their resolve
field.
tag_regex