From dd9b665c1d39b266a282b786ce7ea02b6330f4ae Mon Sep 17 00:00:00 2001 From: Grzegorz Bokota Date: Tue, 17 Dec 2019 21:34:26 +0100 Subject: [PATCH] retry on macos with cli arguments --- cibuildwheel/macos.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 280fdd91..74e072b1 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -51,14 +51,8 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef return subprocess.check_call(args, env=env, cwd=cwd, shell=shell) # get latest pip once and for all - for _ in range(3): - try: - call(['curl', '-L', '-o', get_pip_script, get_pip_url]) - except subprocess.CalledProcessError: - sleep(3) - continue - break - assert os.path.exists(get_pip_script) + + call(['curl', '-L', '-o', '--retry', '3', '--retry-delay', '3', get_pip_script, get_pip_url]) for config in python_configurations: # if this version of python isn't installed, get it from python.org and install