pypa / cibuildwheel

🎡 Build Python wheels for all the platforms with minimal configuration.
https://cibuildwheel.pypa.io
Other
1.84k stars 235 forks source link

set VSCMD_ARG_TGT_ARCH based on targetted architecture #1876

Closed MusicalNinjaDad closed 2 months ago

MusicalNinjaDad commented 3 months ago

This fixes #1861 and any other build setups which make use of setuptools._distutils.util.get_platform() on windows

Approach

Test availability

Potential refactoring idea for a future PR

MusicalNinjaDad commented 3 months ago

Failing check on azure pipelines - linux caused by a timeout waiting to download docker image: docker: Error response from daemon: Get "[https://quay.io/v2/"](https://quay.io/v2/%22): net/http: request canceled (Client.Timeout exceeded while awaiting headers). logs

MusicalNinjaDad commented 3 months ago

@henryiii - I'd welcome your feedback on this suggestion please.

henryiii commented 3 months ago

I've always been in favor of this, it's just been others that are worried that setting this variable will make some build backend confused about not having the others.

henryiii commented 3 months ago

@joerick or @mayeut, thoughts?

mayeut commented 3 months ago

I don't know enough to really have an informed opinion here.

zooba commented 2 months ago

This seems harmless, provided we aren't replacing an existing value for the variable. If it's been set, we have to assume that cross-compilation is configured across a range of settings (particularly LIB and PATH environment variables) and bail out (or use it to automatically select the set of builds to run...?)

Other than that, seems fine. I don't think anything but setuptools takes this into account, but it's as "standard" as things get. Anything else will be backend-specific.

MusicalNinjaDad commented 2 months ago

I think this is done now (?) - I've updated the tests to expect the FatalError and can't think of anything else to do in the main code