From 327b428e453d5394d1bfdb1f866db6f373662813 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Fri, 3 Jan 2025 18:22:51 +0200 Subject: [PATCH 1/4] Add cross-reference from version_scheme config to implementations I had a difficult time finding the implementations in the docs, despite knowing of their existence. Adding this cross-reference should help. x --- docs/config.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/config.md b/docs/config.md index 1d6dfb43..1f599a90 100644 --- a/docs/config.md +++ b/docs/config.md @@ -12,6 +12,7 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_ `version_scheme : str | Callable[[ScmVersion], str]` : Configures how the local version number is constructed; either an entrypoint name or a callable. + See [Version number construction](extending.md#setuptools_scmversion_scheme) for predefined implementations. `local_scheme : str | Callable[[ScmVersion], str]` : Configures how the local component of the version is constructed From c6339877c99f0658bebb081d16f229d3638619ff Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Fri, 3 Jan 2025 18:37:46 +0200 Subject: [PATCH 2/4] Remove the word "local" per PEP 440 In PEP 440, "local" refers to the optional portion of a version after the `+` . But `version_scheme` doesn't apply to this part. --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index 1f599a90..a33dd20c 100644 --- a/docs/config.md +++ b/docs/config.md @@ -11,7 +11,7 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_ : Relative path to the SCM root, defaults to `.` and is relative to the file path passed in `relative_to` `version_scheme : str | Callable[[ScmVersion], str]` -: Configures how the local version number is constructed; either an entrypoint name or a callable. +: Configures how the version number is constructed; either an entrypoint name or a callable. See [Version number construction](extending.md#setuptools_scmversion_scheme) for predefined implementations. `local_scheme : str | Callable[[ScmVersion], str]` From 34a89a98e20fa8287db832e934c6a549c1512b8c Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Fri, 3 Jan 2025 18:39:17 +0200 Subject: [PATCH 3/4] Clarify the definition of "local" Most people reading this sentence probably don't have PEP 440 memorized. --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config.md b/docs/config.md index a33dd20c..8f688489 100644 --- a/docs/config.md +++ b/docs/config.md @@ -15,7 +15,7 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_ See [Version number construction](extending.md#setuptools_scmversion_scheme) for predefined implementations. `local_scheme : str | Callable[[ScmVersion], str]` -: Configures how the local component of the version is constructed +: Configures how the local component of the version (the optional part after the `+`) is constructed; either an entrypoint name or a callable. From 3d8cefee8e94234a7e7e046cb5c7dc313e0790db Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Fri, 3 Jan 2025 18:39:52 +0200 Subject: [PATCH 4/4] Add cross-reference from local_scheme config to implementations --- docs/config.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/config.md b/docs/config.md index 8f688489..a9ef7d4b 100644 --- a/docs/config.md +++ b/docs/config.md @@ -17,6 +17,7 @@ Callables or other Python objects have to be passed in `setup.py` (via the `use_ `local_scheme : str | Callable[[ScmVersion], str]` : Configures how the local component of the version (the optional part after the `+`) is constructed; either an entrypoint name or a callable. + See [Version number construction](extending.md#setuptools_scmlocal_scheme) for predefined implementations. `version_file: Path | PathLike[str] | None = None`