Closed MusicalNinjaDad closed 2 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
@henryiii - I'd welcome your feedback on this suggestion please.
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.
@joerick or @mayeut, thoughts?
I don't know enough to really have an informed opinion here.
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.
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
This fixes #1861 and any other build setups which make use of
setuptools._distutils.util.get_platform()
on windowsApproach
dict
lookup pattern analog to many other places within the codeFatalError
if the variable is preset to a different value than expected.VSCMD_ARG_TGT_ARCH=""
monkeypatch
the environment before callingsetuptools._distutils.util.get_platform()
and validating returned platformTest availability
os.name
in a tight context worked locally (Win11 + WSL2 + Ubunutu 22.04), but fails in pipeline on github actionsPotential refactoring idea for a future PR
dataclass
- there are many places with the patternsomevar = architecture_mapping_dict[arch]
which would be more readable assomevar = targetarchitecure.somevar