AppVeyor: don't download huge pillow-depends.zip #7407
Merged
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.
On AppVeyor, we're downloading a zip of the entire contents of https://github.com/python-pillow/pillow-depends/ mirror which is 851 MB and on my machine takes 6 minutes. We don't use all the files so don't need to download them all.
extract_dep
ofwinbuild/build_prepare.py
first checks if there's a local copy, and if there's not, downloads it from the upstream source.Instead of downloading the whole mirror, I've modified
extract_dep
: if there's not a local copy, it first tries to download from our mirror. If that doesn't succeed, it tried the upstream source.Also add some type hints and capitalise constants.
Also, curl has started failing to download with:
https://ci.appveyor.com/project/Python-pillow/pillow/builds/48061132/job/i2a2jg124obvmoud
Adding
--ssl-no-revoke
fixes it: