meson: Move to the new run_command() API

This commit is contained in:
Ole André Vadla Ravnås
2022-01-20 01:01:47 +01:00
parent 14a664c906
commit 3f635bc84b
+4 -8
View File
@@ -54,18 +54,14 @@ if python_incdir == ''
endif
result = run_command(python, '-c',
'import sys; sys.stdout.write("%d.%d" % (sys.version_info[0], sys.version_info[1]))')
if result.returncode() != 0
error('Unable to detect Python version: ' + result.stdout() + result.stderr())
endif
'import sys; sys.stdout.write("%d.%d" % (sys.version_info[0], sys.version_info[1]))',
check: true)
python_version = result.stdout()
python_name = 'python' + python_version
result = run_command(python, '-c',
'from distutils import sysconfig; import sys; sys.stdout.write(sysconfig.get_python_inc())')
if result.returncode() != 0
error('Unable to detect Python include directory: ' + result.stdout() + result.stderr())
endif
'from distutils import sysconfig; import sys; sys.stdout.write(sysconfig.get_python_inc())',
check: true)
python_incdir = result.stdout()
else
py_major_v = cc.get_define('PY_MAJOR_VERSION',