python-wheel-build / fromager

Build your own wheels
https://fromager.readthedocs.io/en/latest/
Apache License 2.0
7 stars 11 forks source link

Record target platform in `Supported-Platform` METADATA field #495

Open tiran opened 2 weeks ago

tiran commented 2 weeks ago

The Python core metadata specification has a field for supported platforms. We could use the field to store the current platform of a platlib wheel. The information can then be used to detect if a wheel with extension module was compiled for a different platform.

On Linux, the ID and VERSION fields of platform.freedesktop_os_release() can be used to identify the ABI of a platform. AFAIK wheels for macOS have the OS version in the wheel file name.