🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@tacaswell
Copy link
Member

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.

Debugged this on a call with @QuLogic and @ksunden

To generate a checkout in a state that will fail use (in a container):

/usr/bin/git init /home/runner/work/matplotlib/matplotlib
cd /home/runner/work/matplotlib/matplotlib/
/usr/bin/git remote add origin https://github.com/matplotlib/matplotlib
/usr/bin/git config --local gc.auto 0
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +0a6dec17eec446fd28a51bae476a12fd09e73492:refs/remotes/pull/28658/merge
/usr/bin/git checkout --progress --force refs/remotes/pull/28658/merge

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.
@tacaswell tacaswell added this to the v3.9.3 milestone Oct 23, 2024
@tacaswell tacaswell mentioned this pull request Oct 23, 2024
1 task
@timhoffm timhoffm merged commit ed8131b into matplotlib:main Oct 24, 2024
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 24, 2024
timhoffm added a commit that referenced this pull request Oct 24, 2024
…014-on-v3.9.x

Backport PR #29014 on branch v3.9.x (FIX: fake out setuptools scm in tox on ci)
@tacaswell tacaswell deleted the fix/tox_ci branch October 24, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants