From 1dac6e2a1d9efe3173af942c544760336b5191ca Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 1 May 2025 15:44:02 -0400 Subject: [PATCH] BLD: Ensure meson.build has the right version of Python If `python3` is in the path, it might be picked up instead of the one used to build. This is the case on GitHub actions, where cibuildwheel seems to explicitly call the Python (3.11+) it wants, but `python3` is in the hosted tool cache as an older version (3.9) that gets picked by Meson. This matters because we need to run `setuptools_scm` to produce the version, and it may not be installed in the `PATH`-based copy. By specifying the version, Meson should skip the `PATH` option, and choose its final fallback, the interpreter that it is itself running on. While still not guaranteed to be correct everywhere, this should at least work for CI. --- meson.build | 5 ++++- pyproject.toml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index a50f0b8f743a..54249473fe8e 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,10 @@ project( 'matplotlib', 'c', 'cpp', - version: run_command(find_program('python3'), '-m', 'setuptools_scm', check: true).stdout().strip(), + version: run_command( + # Also keep version in sync with pyproject.toml. + find_program('python3', 'python', version: '>= 3.11'), + '-m', 'setuptools_scm', check: true).stdout().strip(), # qt_editor backend is MIT # ResizeObserver at end of lib/matplotlib/backends/web_backend/js/mpl.js is CC0 # Carlogo, STIX and Computer Modern is OFL diff --git a/pyproject.toml b/pyproject.toml index 84e0b774f06c..dc951375bba2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ dependencies = [ "pyparsing >= 3", "python-dateutil >= 2.7", ] +# Also keep in sync with find_program of meson.build. requires-python = ">=3.11" [project.optional-dependencies] 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