scikit-build-core
scikit-build-core copied to clipboard
Configuration of platform tag
Hello,
We build project on x86_64 machine for arm64 target and wheel platform tag will be set to x86_64 but we need to set it to aarch64
Is it possible to set manually in the configuration the platform tag (https://packaging.python.org/en/latest/specifications/platform-compatibility-tags/) or use environment variables for that?
Thanks, Mikhail
For some platforms, see https://scikit-build-core.readthedocs.io/en/latest/crosscompile.html. If it's linux, that's tricky, and something we can work on. Biggest issue for linux is that it's really hard to cross-compile C/C++; you are generally stuck with the (really, really old) compilers that matches the age of manylinux, rather than getting the (nearly) latest compilers that the manylinux images provide with the special RHEL patches to build against an old GLIBC. These older compilers have pretty bad support for special architectures, too; NumPy was unable to use them, for example, even though they did all the rest of the work, the old compiler was just buggy on ARM and they required a newer one to avoid the bugs.
@henryiii thank you for your answer. I did manage to set the platform tag by setting _PYTHON_HOST_PLATFORM=linux_aarch64 and it solved my problem, the wheels were generated with right platform tag (aarch64). So this issue doesn't block us anymore
Eventually I'm hoping that the cross-compiling PEP work (starting with PEP 720) will enable a nicer, more standard interface for this.
Sorry, mentioned wrong issue. Let us know if anything comes up!