Skip to content

Commit

Permalink
Bump setuptools required version because of setuptools_scm v8
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
ksunden committed Sep 20, 2023
1 parent ab1b6a3 commit c70a52e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions doc/api/next_api_changes/development/26849-KS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Minimum version of setuptools bumped to 64
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To comply with requirements of ``setuptools_scm``, the minimum version of ``setuptools``
has been increased from 42 to 64.
2 changes: 1 addition & 1 deletion doc/devel/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ Setup dependencies
runtime dependency.
- `PyBind11 <https://pypi.org/project/pybind11/>`_ (>= 2.6). Used to connect C/C++ code
with Python.
- `setuptools <https://pypi.org/project/setuptools/>`_ (>= 42).
- `setuptools <https://pypi.org/project/setuptools/>`_ (>= 64).
- `setuptools_scm <https://pypi.org/project/setuptools-scm/>`_ (>= 7). Used to
update the reported ``mpl.__version__`` based on the current git commit.
Also a runtime dependency for editable installs.
Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ requires = [
"certifi>=2020.06.20",
"numpy>=1.25",
"pybind11>=2.6",
"setuptools>=42",
"setuptools>=64",
"setuptools_scm>=7",
]

[tool.setuptools_scm]
version_scheme = "release-branch-semver"
local_scheme = "node-and-date"
write_to = "lib/matplotlib/_version.py"
parentdir_prefix_version = "matplotlib-"
fallback_version = "0.0+UNKNOWN"

[tool.isort]
known_pydata = "numpy, matplotlib.pyplot"
known_firstparty = "matplotlib,mpl_toolkits"
Expand Down
1 change: 1 addition & 0 deletions requirements/testing/mypy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ pillow>=8
pyparsing>=2.3.1
python-dateutil>=2.7
setuptools_scm>=7
setuptools>=64

importlib-resources>=3.2.0 ; python_version < "3.10"
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ def make_release_tree(self, base_dir, files):
"python-dateutil>=2.7",
] + (
# Installing from a git checkout that is not producing a wheel.
["setuptools_scm>=7"] if (
# setuptools_scm warns with older setuptools, which turns into errors for our
# test suite. However setuptools_scm does not themselves pin the version of
# setuptools.
["setuptools_scm>=7", "setuptools>=64"] if (
Path(__file__).with_name(".git").exists() and
os.environ.get("CIBUILDWHEEL", "0") != "1"
) else []
Expand Down

0 comments on commit c70a52e

Please sign in to comment.