Skip to content

python: fix mingw python detection code in case pkg-config isn't available - #12586

Merged
eli-schwartz merged 1 commit into
mesonbuild:masterfrom
lazka:fix-python-mingw-platform-checks
Dec 3, 2023
Merged

eli-schwartz merged 1 commit into
mesonbuild:masterfrom
lazka:fix-python-mingw-platform-checks

Conversation

@lazka

@lazka lazka commented Dec 2, 2023

Copy link
Copy Markdown
Contributor

The code assumed that sysconfig.get_platform() returns "mingw" for mingw Python, but that's no longer the case for 2.5 years now, as it now only starts with "mingw" and contains futher information like the arch and other ABI relevant things to avoid conflicts.

This updates the detection code to the current status quo. mingw Python only documents right now that it starts with "mingw", and none of that arch stuff, but it's unlikely that this will change, and this looks less error prone than looking at CC.

Fixes #12547

…lable

The code assumed that sysconfig.get_platform() returns "mingw" for mingw Python,
but that's no longer the case for 2.5 years now, as it now only starts with
"mingw" and contains further information like the arch and other ABI relevant things
to avoid conflicts.

This updates the detection code to the current status quo. mingw Python only documents
right now that it starts with "mingw", and none of that arch stuff, but it's
unlikely that this will change, and this looks less error prone than looking at CC.

Fixes mesonbuild#12547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meson cannot build dependancies of numpy when python from msys2 is used

4 participants