File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,9 @@ def prefetch_windows_virtualenv() -> None:
2828 if cache_path .exists ():
2929 return
3030
31- url = f"https://github.com/pypa/get-virtualenv/releases/download/{ version } /virtualenv.pyz"
31+ # PyPA documents this CDN endpoint for the zipapp. It avoids depending on
32+ # GitHub release assets merely to start cibuildwheel.
33+ url = "https://bootstrap.pypa.io/virtualenv.pyz"
3234 cache_path .parent .mkdir (parents = True , exist_ok = True )
3335 temporary_path = cache_path .with_suffix (".tmp" )
3436
Original file line number Diff line number Diff line change 11set -euo pipefail
22
3- curl \
4- --fail \
5- --location \
6- --retry 8 \
7- --retry-all-errors \
8- --retry-delay 2 \
9- --connect-timeout 30 \
10- --output /tmp/meds-reader-bazelisk \
11- https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64
3+ download_succeeded=0
4+ for attempt in {1..8}; do
5+ if curl \
6+ --fail \
7+ --location \
8+ --connect-timeout 30 \
9+ --max-time 120 \
10+ --output /tmp/meds-reader-bazelisk \
11+ https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-linux-amd64; then
12+ download_succeeded=1
13+ break
14+ fi
15+
16+ if [ " $attempt " -lt 8 ]; then
17+ sleep " $(( attempt * 2 )) "
18+ fi
19+ done
20+
21+ test " $download_succeeded " -eq 1
1222install -m 0755 /tmp/meds-reader-bazelisk /usr/local/bin/bazel
You can’t perform that action at this time.
0 commit comments