Skip to content
  • Eli Schwartz's avatar
    * meson.build: Optimize lookup for `python3` program. · d6a5c577
    Eli Schwartz authored and Werner Lemberg's avatar Werner Lemberg committed
    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.
    d6a5c577