Commit d6a5c577 authored by Eli Schwartz's avatar Eli Schwartz Committed by Werner Lemberg
Browse files

* 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.
parent 57fd6180
Pipeline #467870 passed with stage
in 10 minutes and 11 seconds
......@@ -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'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment