File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1010 - uses : actions/checkout@v4
1111 with :
1212 show-progress : false
13+ - uses : actions/setup-python@v5
14+ with :
15+ python-version : ' 3.13'
1316 - name : Setup Linux
1417 if : runner.os == 'Linux'
1518 run : |
3740 bazel build @workerd//src/pyodide:python_bundles @workerd//src/pyodide:bundle_version_info --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.devprod.cloudflare.dev
3841 # boto3 v1.36.0 fails with:
3942 # NotImplemented error occurred in CreateMultipartUpload operation: Header 'x-amz-checksum-algorithm' with value 'CRC32' not implemented
40- pip install 'boto3<1.36.0'
43+ pip install 'boto3<1.36.0' requests
4144 python3 src/pyodide/upload_bundles.py
Original file line number Diff line number Diff line change 11import json
22import subprocess
33import sys
4+ from base64 import b64encode
45from copy import deepcopy
56from functools import cache
7+ from hashlib import file_digest
68from os import environ
79from pathlib import Path
810
@@ -80,6 +82,15 @@ def main():
8082 info ["backport" ] = b
8183 key = bundle_key (** info )
8284 print (f"Uploading version { ver } backport { b } " )
85+ shasum = (
86+ "sha256-"
87+ + b64encode (file_digest (path .open ("rb" ), "sha256" ).digest ()).decode ()
88+ )
89+ i = " " * 8
90+ print ("Update python_metadata.bzl with:\n " )
91+ print (i + f'"backport": "{ b } ",' )
92+ print (i + f'"integrity": "{ shasum } ",' )
93+ print ()
8394 s3 .upload_file (str (path ), "pyodide-capnp-bin" , key )
8495 return 0
8596
You can’t perform that action at this time.
0 commit comments