Skip to content

Commit 6a002e0

Browse files
more consistent documentation on setuptools version requirements and recommendations
closes #921
1 parent 8ed737b commit 6a002e0

File tree

7 files changed

+23
-10
lines changed

7 files changed

+23
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
- fix #1150: enable setuptools-scm when we are a build requirement
2929
- feature #1154: add the commit id the the default version file template
3030
- drop scriv
31+
- fix #921: document setuptools version requirements more consistently - 61 as minumum asn 8 as recommended minimum
3132

3233
### Fixed
3334

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ or [configuring Git archive][git-archive-docs].
2424
The preferred way to configure [setuptools-scm] is to author
2525
settings in a `tool.setuptools_scm` section of `pyproject.toml`.
2626

27-
This feature requires setuptools 61 or later.
27+
This feature requires setuptools 61 or later (recommended: >=80 for best compatibility).
2828
First, ensure that [setuptools-scm] is present during the project's
2929
build step by specifying it as one of the build requirements.
3030

3131
```toml title="pyproject.toml"
3232
[build-system]
33-
requires = ["setuptools>=64", "setuptools-scm>=8"]
33+
requires = ["setuptools>=80", "setuptools-scm>=8"]
3434
build-backend = "setuptools.build_meta"
3535
```
3636

@@ -61,7 +61,7 @@ dynamic = ["version"]
6161

6262
```toml title="pyproject.toml"
6363
[build-system]
64-
requires = ["setuptools>=64", "setuptools-scm>=8"]
64+
requires = ["setuptools>=80", "setuptools-scm>=8"]
6565
build-backend = "setuptools.build_meta"
6666

6767
[project]
@@ -108,6 +108,12 @@ modern [setuptools-scm] is unable to support them sensibly.
108108
It's strongly recommended to build a wheel artifact using modern Python and setuptools,
109109
then installing the artifact instead of trying to run against old setuptools versions.
110110

111+
!!! note "Legacy Setuptools Support"
112+
While setuptools-scm recommends setuptools >=80, it maintains compatibility with setuptools 61+
113+
to support legacy deployments that cannot easily upgrade. Support for setuptools <80 is deprecated
114+
and will be removed in a future release. This allows enterprise environments and older CI/CD systems
115+
to continue using setuptools-scm while still encouraging adoption of newer versions.
116+
111117

112118
## Code of Conduct
113119

docs/customizing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ setup(use_scm_version={"version_scheme": myversion_func})
3333

3434
``` { .toml title="pyproject.toml" file="docs/examples/version_scheme_code/pyproject.toml" }
3535
[build-system]
36-
requires = ["setuptools>=64", "setuptools-scm>=8"]
36+
requires = ["setuptools>=80", "setuptools-scm>=8"] # setuptools>=61 minimum, >=80 recommended
3737
build-backend = "setuptools.build_meta"
3838

3939
[project]

docs/examples/version_scheme_code/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ~/~ begin <<docs/customizing.md#docs/examples/version_scheme_code/pyproject.toml>>[init]
22
[build-system]
3-
requires = ["setuptools>=64", "setuptools-scm>=8"]
3+
requires = ["setuptools>=80", "setuptools-scm>=8"] # setuptools>=61 minimum, >=80 recommended
44
build-backend = "setuptools.build_meta"
55

66
[project]

docs/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@ or [configuring Git archive][git-archive-docs].
2727
### With setuptools
2828

2929
Note: `setuptools-scm>=8` intentionally doesn't depend on setuptools to ease non-setuptools usage.
30-
Please ensure a recent version of setuptools (>=64) is installed.
30+
Please ensure a recent version of setuptools is installed (minimum: >=61, recommended: >=80 for best compatibility).
31+
Support for setuptools <80 is deprecated and will be removed in a future release.
3132

3233

3334
```toml title="pyproject.toml"
3435
[build-system]
35-
requires = ["setuptools>=64", "setuptools-scm>=8"]
36+
requires = ["setuptools>=80", "setuptools-scm>=8"]
3637
build-backend = "setuptools.build_meta"
3738

3839
[project]

docs/usage.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## At build time
44

5+
!!! note "Setuptools Version Requirements"
6+
setuptools-scm requires setuptools 61 or later (minimum), but recommends >=80 for best compatibility.
7+
Support for setuptools <80 is deprecated and will be removed in a future release.
8+
The examples below use `setuptools>=80` as the recommended version.
9+
510
There are two ways to configure `setuptools-scm` at build time, depending on your needs:
611

712
### Automatic Configuration (Recommended for Simple Cases)
@@ -11,7 +16,7 @@ in your build requirements:
1116

1217
```toml title="pyproject.toml"
1318
[build-system]
14-
requires = ["setuptools>=64", "setuptools-scm>=8"]
19+
requires = ["setuptools>=80", "setuptools-scm>=8"]
1520
build-backend = "setuptools.build_meta"
1621

1722
[project]
@@ -29,7 +34,7 @@ If you need to customize setuptools-scm behavior, use the `tool.setuptools_scm`
2934

3035
```toml title="pyproject.toml"
3136
[build-system]
32-
requires = ["setuptools>=64", "setuptools-scm>=8"]
37+
requires = ["setuptools>=80", "setuptools-scm>=8"]
3338
build-backend = "setuptools.build_meta"
3439

3540
[project]

src/setuptools_scm/_integration/setuptools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _warn_on_old_setuptools(_version: str = setuptools.__version__) -> None:
3434
ERROR: setuptools=={_version} is used in combination with setuptools-scm>=8.x
3535
3636
Your build configuration is incomplete and previously worked by accident!
37-
setuptools-scm requires setuptools>=61
37+
setuptools-scm requires setuptools>=61 (recommended: >=80)
3838
3939
Suggested workaround if applicable:
4040
- migrating from the deprecated setup_requires mechanism to pep517/518

0 commit comments

Comments
 (0)