-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove setuptools_scm_git_archive dependency and add sdist test #23387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tacaswell
merged 2 commits into
matplotlib:main
from
oscargus:removesetuptoolsscmgitarchive
Aug 14, 2022
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true)$ | ||
ref-names: $Format:%D$ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Build CI sdist and wheel | ||
|
||
on: | ||
# Save CI by only running this on release branches or tags. | ||
push: | ||
branches: | ||
- main | ||
- v[0-9]+.[0-9]+.x | ||
tags: | ||
- v* | ||
# Also allow running this action on PRs if requested by applying the | ||
# "Run cibuildwheel" label. | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
|
||
jobs: | ||
build_sdist: | ||
if: | | ||
github.event_name == 'push' || | ||
github.event_name == 'pull_request' && ( | ||
( | ||
github.event.action == 'labeled' && | ||
github.event.label.name == 'Run cibuildwheel' | ||
) || | ||
contains(github.event.pull_request.labels.*.name, 'Run cibuildwheel') | ||
) | ||
name: Build sdist and wheel on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
python-version: ['3.8', '3.9', '3.10', '3.11.0-alpha - 3.11'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v4 | ||
name: Install Python | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install build | ||
run: pip install build | ||
|
||
- name: Build sdist and wheel | ||
run: python -m build . | ||
|
||
- name: Install built matplotlib sdist | ||
run: pip install dist/matplotlib*.tar.gz | ||
|
||
- name: Check version number is not 0 | ||
run: python ./ci/check_version_number.py | ||
|
||
- name: Install built matplotlib wheel | ||
run: pip install dist/matplotlib*.whl --force-reinstall | ||
|
||
- name: Check version number is not 0 | ||
run: python ./ci/check_version_number.py |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
Check that the version number of the install Matplotlib does not start with 0 | ||
|
||
To run: | ||
$ python3 -m build . | ||
$ pip install dist/matplotlib*.tar.gz for sdist | ||
$ pip install dist/matplotlib*.whl for wheel | ||
$ ./ci/check_version_number.py | ||
""" | ||
import matplotlib | ||
|
||
import sys | ||
|
||
EXIT_SUCCESS = 0 | ||
EXIT_FAILURE = 1 | ||
|
||
|
||
print(f"Version {matplotlib.__version__} installed") | ||
if matplotlib.__version__[0] == "0": | ||
sys.exit(EXIT_FAILURE) | ||
sys.exit(EXIT_SUCCESS) |
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this line? the refs name includes both branches and tags and is the source of a lot of trouble with non-reproducible downloads from github...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea. I just copied from https://github.com/Changaco/setuptools_scm_git_archive where they have that line in the migration guide.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets defer this question to a later time. It is a can of worms I do not want to block this moving forward.