forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python module: Use sys_root's Python sysconfigdata to get EXT_SUFFIX
Until now, the build host's EXT_SUFFIX was used, resulting in native extensions being build and installed with the wrong filename. To do this, we load the sys_root sysconfigdata from its stdlib directory. We assume that the same Python version as the build host exists within the sys_root with the same stdlib directory, save for the prefix. If not, we fall back to the build host, as we did before. If the machine file points python at a Python within sys_root then this should still work. You should probably only run a sys_root's binary using some kind of wrapper, but either way, sysconfig will still return the correct values. We only read EXT_SUFFIX from the sys_root because paths are expected to be the same, save for the prefix, and other info such as the platform and limited API suffix cannot be determined this way. We could potentially guess the limited API suffix from the platform, as there are only a small number of possible values, but this can be done separately. Closes: mesonbuild#7049
- Loading branch information
Showing
3 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters