From 2b0722fafa8b11b69a65073e13a00caf6b86a75b Mon Sep 17 00:00:00 2001 From: Pierre Augier Date: Wed, 22 Jan 2025 22:21:59 +0100 Subject: [PATCH] Mention SETUPTOOLS_SCM_PRETEND_VERSION_FOR in error message --- src/setuptools_scm/_get_version_impl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/setuptools_scm/_get_version_impl.py b/src/setuptools_scm/_get_version_impl.py index 1b81a4b2..cced45e2 100644 --- a/src/setuptools_scm/_get_version_impl.py +++ b/src/setuptools_scm/_get_version_impl.py @@ -122,7 +122,10 @@ def _version_missing(config: Configuration) -> NoReturn: "metadata and will not work.\n\n" "For example, if you're using pip, instead of " "https://github.com/user/proj/archive/master.zip " - "use git+https://github.com/user/proj.git#egg=proj" + "use git+https://github.com/user/proj.git#egg=proj\n\n" + "Alternatively, set the version with the environment variable " + "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME} as described " + "in https://setuptools-scm.readthedocs.io/en/latest/config." )