Brénainn Woodsend
Brénainn Woodsend
That would certainly explain it (although I'm surprised that `platform.machine()` doesn't return `AMD64` in that case).
If you still have that amd64 Python installed, could you check what this returns? ```python import sysconfig print(sysconfig.get_platform()) ```
Answering our own questions: ```python >>> import platform >>> platform.machine() 'ARM64' >>> platform.architecture() ('64bit', 'WindowsPE') >>> import sysconfig >>> print(sysconfig.get_platform()) win-amd64 >>> import os >>> print(os.environ.get('PROCESSOR_ARCHITEW6432')) None >>> print(os.environ.get('PROCESSOR_ARCHITECTURE')) AMD64...
And for reference, this is what it looks like with the 32 bit installer on ARM64. ```python >>> import platform >>> platform.machine() 'ARM64' >>> import sysconfig >>> print(sysconfig.get_platform()) win32 >>>...
Those outputs on Python 3.11 are identical to the ones from Python 3.12.
It looks like pip (via packaging) [is using sysconfig](https://github.com/pypa/packaging/blob/57a6a7ff661930a8b0dde55663947b80cf3c196a/src/packaging/tags.py#L508-L521C16). It would probably make sense to match method, although it probably doesn't matter either way.
> Does sysconfig.get_platform() under arm64 python return win-arm64? Yes. And `PROCESSOR_ARCHITECTURE` is set to `ARM64`.
I suppose that `PROCESSOR_ARCHITECTURE` does give us exactly what we're looking for without any normalisation. In which case, I guess I'll vote we use `PROCESSOR_ARCHITECTURE`.
Ughh why would it do that? I thought that the whole point of the sysconfig module was to expose compile time options, in this case the target platform...
How do you expect `non-native-python waf all` to work? Half the time, `wscript` sets its target platform based on what `waf` can infer from the compiler and the other half...