[glib/gbsneto/python-find] build: Let Meson figure out Python installation




commit 255fa26b964bbcd22150dafbfe5ead0acf0b84ad
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Sep 29 17:18:10 2022 -0300

    build: Let Meson figure out Python installation
    
    Commit 4a4d9eb6624 initially switched Meson to find the python
    program using find_program('python3'). Sadly that caused a
    regression, since in some cases with MSVC it would fallback to
    'meson.exe runpython', which is undesired.
    
    However, that particular code was reverted back to an also
    undesired lookup method, find_installation('python3'). This
    way of finding python also breaks on Windows + MSVC, in particular
    when setting it up as follows:
    
    ```
    winget install python
    winget install meson
    ```
    
    This fails building GLib with:
    
    > python3 not found
    
    Fix that by not passing any argument to find_installation(), which
    lets Meson figure it all out by itself.

 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 3a81ec5caf..8f017a4b76 100644
--- a/meson.build
+++ b/meson.build
@@ -2271,7 +2271,7 @@ endif
 
 glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
 
-python = import('python').find_installation('python3')
+python = import('python').find_installation()
 # used for '#!/usr/bin/env <name>'
 python_name = 'python3'
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]