From 3b2d1b6006091ad95216cef4cc1f3ec1e94eee5c Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 23 Oct 2024 16:39:06 -0400 Subject: [PATCH] FIX: fake out setuptools scm in tox on ci The repository in GHA is a shallow checkout (so to tags) so we are going to get the version wrong no matter what. However, a recent change to our build dependencies (we think meson-python at 0.17) causes setumtools scm to fail to extract any version when installing from a generated sdist. By setting a pretend version setuptools_scm will never try to look at git. It is not yet clear if this fixes the sdist itself or just continues to use the pretend version when installing. --- tox.ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tox.ini b/tox.ini index 306d9140a8fe..3e19b48b6ba7 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,8 @@ setenv = MPLCONFIGDIR={envtmpdir}/.matplotlib PIP_USER = 0 PIP_ISOLATED = 1 + SETUPTOOLS_SCM_PRETEND_VERSION_FOR_MATPLOTLIB = 0.0.0 + usedevelop = True commands = pytest --pyargs matplotlib.tests {posargs}