FIX: fake out setuptools scm in tox on ci#29014
Merged
timhoffm merged 1 commit intomatplotlib:mainfrom Oct 24, 2024
Merged
Conversation
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.
1 task
ksunden
approved these changes
Oct 23, 2024
timhoffm
approved these changes
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)
This was referenced Oct 30, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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