freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master d6a5c57 3/3: * meson.build: Optimize lookup for `pyth


From: Werner Lemberg
Subject: [freetype2] master d6a5c57 3/3: * meson.build: Optimize lookup for `python3` program.
Date: Fri, 17 Dec 2021 04:53:11 -0500 (EST)

branch: master
commit d6a5c57727643fc7a0d30e10776edf9c2c5956ae
Author: Eli Schwartz <eschwartz@archlinux.org>
Commit: Werner Lemberg <wl@gnu.org>

    * meson.build: Optimize lookup for `python3` program.
    
    The python module's `find_installation` method is intended to provide
    routines for compiling and installing python modules into the
    `site-packages` directory.  It does a couple of slow things, including run
    an introspection command to scrape sysconfig info from the detected
    interpreter, which are not needed for the sole use case of invoking the
    found installation as an executable.
    
    Furthermore, when invoked without the name or path of a python binary, it is
    hardcoded to always look for `python3` corresponding to the interpreter
    meson itself uses to run.  So using `find_installation` did not even allow
    detecting `python2` as a fallback.
    
    Instead, switch to a simple `find_program` lookup that finishes as soon as
    the program is found.
---
 meson.build | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 6ea4bfa..5e8d8ef 100644
--- a/meson.build
+++ b/meson.build
@@ -36,8 +36,7 @@ project('freetype2', 'c',
 # variable; we thus use an external command to have this functionality
 # with older versions, too.
 
-python = import('python')
-python_exe = python.find_installation(required: true)
+python_exe = find_program('python3')
 
 ft2_so_version = run_command(python_exe,
   files('builds/meson/extract_libtool_version.py'),



reply via email to

[Prev in Thread] Current Thread [Next in Thread]