Skip to content

Commit 529d5bb

Browse files
Merge pull request #955 from jaap3/patch-1
Update requires
2 parents 06e0aaf + 0c18def commit 529d5bb

File tree

5 files changed

+20
-34
lines changed

5 files changed

+20
-34
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,14 @@ Unwanted files must be excluded via `MANIFEST.in`.
2020
The preferred way to configure [setuptools-scm] is to author
2121
settings in a `tool.setuptools_scm` section of `pyproject.toml`.
2222

23-
This feature requires setuptools 60 or later.
23+
This feature requires setuptools 61 or later.
2424
First, ensure that [setuptools-scm] is present during the project's
2525
build step by specifying it as one of the build requirements.
2626

27-
```toml
27+
```toml title="pyproject.toml"
2828
[build-system]
29-
requires = [
30-
"setuptools>=60",
31-
"setuptools-scm>=8.0"]
29+
requires = ["setuptools>=64", "setuptools_scm>=8"]
30+
build-backend = "setuptools.build_meta"
3231
```
3332

3433
That will be sufficient to require [setuptools-scm] for projects
@@ -46,6 +45,7 @@ dynamically in the `project` section of `pyproject.toml`:
4645
[project]
4746
# version = "0.0.1" # Remove any existing version parameter.
4847
dynamic = ["version"]
48+
4949
[tool.setuptools_scm]
5050
```
5151

docs/customizing.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,10 @@ setup(use_scm_version={"version_scheme": myversion_func})
3131
```
3232

3333

34-
``` { .python title="pyproject.toml" file="docs/examples/version_scheme_code/pyproject.toml" }
34+
``` { .toml title="pyproject.toml" file="docs/examples/version_scheme_code/pyproject.toml" }
3535
[build-system]
36-
requires = [
37-
"setuptools>=64",
38-
"setuptools_scm>=8",
39-
"wheel",
40-
]
36+
requires = ["setuptools>=64", "setuptools_scm>=8"]
37+
build-backend = "setuptools.build_meta"
4138

4239
[project]
4340
name = "scm-example"
@@ -49,9 +46,6 @@ dynamic = [
4946
```
5047

5148
- [ ] add a build block that adds example output
52-
- [ ] correct config after [entangled mkdocs bug] is fixed
53-
54-
[entangled mkdocs bug]: https://github.com/entangled/mkdocs-plugin/issues/1
5549

5650

5751

docs/examples/version_scheme_code/pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
# ~/~ begin <<docs/customizing.md#docs/examples/version_scheme_code/pyproject.toml>>[init]
22
[build-system]
3-
requires = [
4-
"setuptools>=64",
5-
"setuptools_scm>=8",
6-
"wheel",
7-
]
3+
requires = ["setuptools>=64", "setuptools_scm>=8"]
4+
build-backend = "setuptools.build_meta"
85

96
[project]
107
name = "scm-example"

docs/index.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,11 @@ Note: `setuptools_scm>=8` intentionally doesn't depend on setuptools to ease non
1717
Please ensure a recent version of setuptools (>=64) is installed.
1818

1919

20-
```toml
21-
# pyproject.toml
20+
```toml title="pyproject.toml"
2221
[build-system]
23-
requires = [
24-
"setuptools>=64",
25-
"setuptools_scm>=8",
26-
"wheel",
27-
]
22+
requires = ["setuptools>=64", "setuptools_scm>=8"]
23+
build-backend = "setuptools.build_meta"
24+
2825
[project]
2926
name = "example"
3027
# Important: Remove any existing version declaration

docs/usage.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ settings in the `tool.setuptools_scm` section of `pyproject.toml`.
77

88
It's necessary to use a setuptools version released after 2022.
99

10-
```toml
11-
# pyproject.toml
10+
```toml title="pyproject.toml"
1211
[build-system]
13-
requires = ["setuptools>=62", "setuptools_scm[toml]>=8.0"]
12+
requires = ["setuptools>=64", "setuptools_scm>=8"]
13+
build-backend = "setuptools.build_meta"
1414

1515
[project]
1616
# version = "0.0.1" # Remove any existing version parameter.
@@ -27,8 +27,7 @@ Tools that still invoke `setup.py` must ensure build requirements are installed
2727

2828
### version files
2929

30-
```toml
31-
# pyproject.toml
30+
```toml title="pyproject.toml"
3231
...
3332
[tool.setuptools_scm]
3433
version_file = "pkg/_version.py"
@@ -108,8 +107,7 @@ you can retrieve it at runtime from PEP-0566_ metadata using
108107
``importlib.metadata`` from the standard library (added in Python 3.8)
109108
or the `importlib_metadata`_ backport:
110109

111-
```python
112-
# contents of package_name/__init__.py
110+
```python title="package_name/__init__.py"
113111
from importlib.metadata import version, PackageNotFoundError
114112

115113
try:
@@ -259,7 +257,7 @@ be kept in version control. It's strongly recommended to be put into gitignore.
259257

260258

261259

262-
### File finders hook makes most of MANIFEST.in unnecessary
260+
### File finders hook makes most of `MANIFEST.in` unnecessary
263261

264262
`setuptools_scm` implements a [file_finders] entry point
265263
which returns all files tracked by your SCM.

0 commit comments

Comments
 (0)