Repeat get-pip download on fail

This commit is contained in:
Grzegorz Bokota
2019-12-17 01:09:06 +01:00
parent 795413e5c0
commit a1832ae6c6
2 changed files with 19 additions and 2 deletions
+10 -1
View File
@@ -1,5 +1,6 @@
from __future__ import print_function
import os, tempfile, subprocess, shutil, sys
from time import sleep
from collections import namedtuple
from glob import glob
@@ -96,7 +97,15 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
download('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', nuget)
# get pip fo this installation which not have.
get_pip_script = 'C:\\cibw\\get-pip.py'
download('https://bootstrap.pypa.io/get-pip.py', get_pip_script)
for _ in range(10):
try:
download('https://bootstrap.pypa.io/get-pip.py', get_pip_script)
except:
sleep(3)
continue
break
assert os.path.exists(get_pip_script)
python_configurations = get_python_configurations(build_selector)
for config in python_configurations: