Should CIBW_ENVIRONMENT affect the "Install build tools…" step?
When testing PIP_GLOBAL_OPTION just now I noticed that the CIBW_ENVIRONMENT option is applied before the "Install build tools…" step on Mac and Windows. That surprised me, because I had assumed that this was part of the internal machinery of cibuildwheel and that this shouldn't be affected by user options. For example, it's possible to make this step fail with a bad PIP_GLOBAL_OPTION setting.
I'd propose that we change it to evaluate the CIBW_ENVIRONMENT options after the "Install build tools" step. @henryiii @mayeut any thoughts? any reason why we shouldn't do that?
@joerick,
I'm not sure it's worth changing this behavior. Unless I'm missing something (and this is definitely a possibility), wouldn't the build fail later on, even when using the build frontend ? In which case failing early on is probably better (pip itself is installed without taking CIBW_ENVIRONMENT into account which should prevent bootstrapping issues when installing/upgrading pip).
I suppose I was thinking about when users set an option in CIBW_ENVIRONMENT that's intended for the pip wheel step, like erm... let's say PIP_NO_BINARY or PIP_INDEX_URL... it shouldn't affect a the build tools install step. But yeah, it's mostly a theoretical concern so maybe it isn't worth changing.