From c70a52edf48a133ff9b7ea022d8a43c8efc58109 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Wed, 20 Sep 2023 17:48:00 -0500 Subject: [PATCH] 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). --- doc/api/next_api_changes/development/26849-KS.rst | 5 +++++ doc/devel/dependencies.rst | 2 +- pyproject.toml | 9 ++++++++- requirements/testing/mypy.txt | 1 + setup.py | 5 ++++- 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 doc/api/next_api_changes/development/26849-KS.rst diff --git a/doc/api/next_api_changes/development/26849-KS.rst b/doc/api/next_api_changes/development/26849-KS.rst new file mode 100644 index 000000000000..1a1deda40fca --- /dev/null +++ b/doc/api/next_api_changes/development/26849-KS.rst @@ -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. diff --git a/doc/devel/dependencies.rst b/doc/devel/dependencies.rst index a865b80cab84..400bc63d42ac 100644 --- a/doc/devel/dependencies.rst +++ b/doc/devel/dependencies.rst @@ -228,7 +228,7 @@ Setup dependencies runtime dependency. - `PyBind11 `_ (>= 2.6). Used to connect C/C++ code with Python. -- `setuptools `_ (>= 42). +- `setuptools `_ (>= 64). - `setuptools_scm `_ (>= 7). Used to update the reported ``mpl.__version__`` based on the current git commit. Also a runtime dependency for editable installs. diff --git a/pyproject.toml b/pyproject.toml index 5c61dd9ff055..4d9ccce2b290 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/requirements/testing/mypy.txt b/requirements/testing/mypy.txt index f697772da5ea..a5ca15cfbdad 100644 --- a/requirements/testing/mypy.txt +++ b/requirements/testing/mypy.txt @@ -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" diff --git a/setup.py b/setup.py index 98aed8ccc912..899021a83254 100644 --- a/setup.py +++ b/setup.py @@ -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 [] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy