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.
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
andVERSION
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.