Skip to content

Commit c70a52e

Browse files
committed
Bump setuptools required version because of setuptools_scm v8
Technically could work with older setuptools and setuptools_scm==7, but encoding that matrix of dependencies is not something I think is worth worrying about, and setuptools 64 is over a year old (though not by a _whole_ lot).
1 parent ab1b6a3 commit c70a52e

File tree

5 files changed

+19
-3
lines changed

5 files changed

+19
-3
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Minimum version of setuptools bumped to 64
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
To comply with requirements of ``setuptools_scm``, the minimum version of ``setuptools``
5+
has been increased from 42 to 64.

doc/devel/dependencies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ Setup dependencies
228228
runtime dependency.
229229
- `PyBind11 <https://pypi.org/project/pybind11/>`_ (>= 2.6). Used to connect C/C++ code
230230
with Python.
231-
- `setuptools <https://pypi.org/project/setuptools/>`_ (>= 42).
231+
- `setuptools <https://pypi.org/project/setuptools/>`_ (>= 64).
232232
- `setuptools_scm <https://pypi.org/project/setuptools-scm/>`_ (>= 7). Used to
233233
update the reported ``mpl.__version__`` based on the current git commit.
234234
Also a runtime dependency for editable installs.

pyproject.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ requires = [
44
"certifi>=2020.06.20",
55
"numpy>=1.25",
66
"pybind11>=2.6",
7-
"setuptools>=42",
7+
"setuptools>=64",
88
"setuptools_scm>=7",
99
]
1010

11+
[tool.setuptools_scm]
12+
version_scheme = "release-branch-semver"
13+
local_scheme = "node-and-date"
14+
write_to = "lib/matplotlib/_version.py"
15+
parentdir_prefix_version = "matplotlib-"
16+
fallback_version = "0.0+UNKNOWN"
17+
1118
[tool.isort]
1219
known_pydata = "numpy, matplotlib.pyplot"
1320
known_firstparty = "matplotlib,mpl_toolkits"

requirements/testing/mypy.txt

+1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ pillow>=8
2424
pyparsing>=2.3.1
2525
python-dateutil>=2.7
2626
setuptools_scm>=7
27+
setuptools>=64
2728

2829
importlib-resources>=3.2.0 ; python_version < "3.10"

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,10 @@ def make_release_tree(self, base_dir, files):
340340
"python-dateutil>=2.7",
341341
] + (
342342
# Installing from a git checkout that is not producing a wheel.
343-
["setuptools_scm>=7"] if (
343+
# setuptools_scm warns with older setuptools, which turns into errors for our
344+
# test suite. However setuptools_scm does not themselves pin the version of
345+
# setuptools.
346+
["setuptools_scm>=7", "setuptools>=64"] if (
344347
Path(__file__).with_name(".git").exists() and
345348
os.environ.get("CIBUILDWHEEL", "0") != "1"
346349
) else []

0 commit comments

Comments
 (0)