diff options
author | Dudemanguy <random342@airmail.cc> | 2023-10-29 10:15:40 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-10-29 19:48:43 +0000 |
commit | 50187264fae1e000d0b72663f6c5f45a4980a81f (patch) | |
tree | f77dfdc07af37d2eabc77c2d30e5561316cfda84 /meson.build | |
parent | a57bd8e2b8a1871dc2613984b7ca93dd7bcb5419 (diff) | |
download | mpv-50187264fae1e000d0b72663f6c5f45a4980a81f.tar.bz2 mpv-50187264fae1e000d0b72663f6c5f45a4980a81f.tar.xz |
Revert "meson: import python module"
Since distutils was dropped from python 3.12, we can't rely on a
standard library implementation for version comparison anymore hence
the switch to packaging instead which is essentially supposed to be the
replacement. This is problematic though because macOS can have several
ways of managing python can result in the build calling the wrong python
binary that doesn't have the actual packaging library installed. This
commit was a workaround for that since it would fetch the python used to
run the build (which is probably the one the user wants), but apparently
upstream doesn't like this and it's subject to change*. So instead,
let's solve try, and solve this a different way.
This reverts commit a57bd8e2b8a1871dc2613984b7ca93dd7bcb5419.
*: https://github.com/mesonbuild/meson/pull/12116#pullrequestreview-1575846647
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 94c05ed101..345b591a8c 100644 --- a/meson.build +++ b/meson.build @@ -13,7 +13,7 @@ project('mpv', build_root = meson.project_build_root() source_root = meson.project_source_root() -python = import('python').find_installation() +python = find_program('python3') # ffmpeg libavcodec = dependency('libavcodec', version: '>= 58.134.100') @@ -1475,10 +1475,7 @@ endif macos_sdk_path = '' macos_sdk_version = '0.0' if darwin and macos_sdk_version_py.found() - # Execute macos-sdk-version.py with Python provided by meson. - # In some cases, Python executable with the necessary modules might not refer to python3 - # (e.g. python@3.12 and python-packaging Homebrew packages). - macos_sdk_info = run_command(python, macos_sdk_version_py, check: true).stdout().split(',') + macos_sdk_info = run_command(macos_sdk_version_py, check: true).stdout().split(',') macos_sdk_path = macos_sdk_info[0].strip() macos_sdk_version = macos_sdk_info[1] endif |