mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Fix KeyError
when running add_miniforge.py
I was attempting to run the script to generate build files for new
versions, but it failed because version `23.1.0-4`[^1] contained a
malformed `.sha256` file.[^2] I looked at the miniforge repo's script
`releases.py`[^3] and copied the logic about which release artifacts
should be skipped when generating a list of downloads.
[^1]: https://github.com/conda-forge/miniforge/releases/tag/23.1.0-4
[^2]: https://github.com/conda-forge/miniforge/releases/download/23.1.0-4/Miniforge3-uninstaller-patch-Windows-x86_64.exe.sha256
[^3]: a15762906b/docs/releases.py (L35-L36)
This commit is contained in:
parent
02e1d4a293
commit
8316450887
1 changed files with 2 additions and 1 deletions
|
@ -71,8 +71,9 @@ def supported(filename):
|
||||||
return ('pypy' not in filename) and ('Windows' not in filename)
|
return ('pypy' not in filename) and ('Windows' not in filename)
|
||||||
|
|
||||||
def add_version(release):
|
def add_version(release):
|
||||||
|
tag_name = release['tag_name']
|
||||||
download_urls = { f['name']: f['browser_download_url'] for f in release['assets'] }
|
download_urls = { f['name']: f['browser_download_url'] for f in release['assets'] }
|
||||||
shas = dict([download_sha(url) for (name, url) in download_urls.items() if name.endswith('.sha256')])
|
shas = dict([download_sha(url) for (name, url) in download_urls.items() if name.endswith('.sha256') and tag_name in name])
|
||||||
specs = [create_spec(filename, sha, download_urls[filename]) for (filename, sha) in shas.items() if supported(filename)]
|
specs = [create_spec(filename, sha, download_urls[filename]) for (filename, sha) in shas.items() if supported(filename)]
|
||||||
|
|
||||||
for distribution in DISTRIBUTIONS:
|
for distribution in DISTRIBUTIONS:
|
||||||
|
|
Loading…
Reference in a new issue