Skip to content

Commit

Permalink
Retry building a wheel up to 3 times. (#29676)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvalentyn authored Dec 8, 2023
1 parent e19ace0 commit b7530a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdks/python/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ platform_identifiers_map.each { platform, idsuffix ->
environment CIBW_ENVIRONMENT: "SETUPTOOLS_USE_DISTUTILS=stdlib"
// note: sync cibuildwheel version with GitHub Action
// .github/workflow/build_wheel.yml:build_wheels "Install cibuildwheel" step
// note(https://github.com/pypa/cibuildwheel/issues/1692): cibuildwheel appears to timeout occasionally.
executable 'sh'
args '-c', ". ${envdir}/bin/activate && " +
"pip install cibuildwheel==2.9.0 && " +
"cibuildwheel --print-build-identifiers --platform ${platform} --archs ${archs} && " +
"cibuildwheel --output-dir ${buildDir} --platform ${platform} --archs ${archs}"
"for i in {1..3}; do cibuildwheel --output-dir ${buildDir} --platform ${platform} --archs ${archs} && break; done"
}
}
}
Expand Down Expand Up @@ -162,4 +163,4 @@ tasks.register("wordCount") {
args '-c', ". ${envdir}/bin/activate && python -m apache_beam.examples.wordcount --runner DirectRunner --output /tmp/output.txt"
}
}
}
}

0 comments on commit b7530a2

Please sign in to comment.