let script = "import sysconfig; print('framework' if sysconfig.get_config_var('PYTHONFRAMEWORK') else ('shared' if sysconfig.get_config_var('Py_ENABLE_SHARED') else 'static'));";
print(sysconfig.get_config_var('LDVERSION') or '%s%s' % (sysconfig.get_config_var('py_version_short'), sysconfig.get_config_var('DEBUG_EXT') or '')); \
print(sys.exec_prefix);";
let out = run_python_script(interpreter, script)?;
letmut lines:Vec<String> = out
.split(NEWLINE_SEQUENCE)
.map(|line| line.to_owned())
.collect();
let executable = lines.remove(0);
let interpreter_version = lines.remove(0);
let interpreter_version = get_interpreter_version(&interpreter_version)?;
Ok((executable, interpreter_version, lines))
}
/// Deduce configuration from the 'python' in the current PATH and print
/// cargo vars to stdout.
///
/// Note that if the python doesn't satisfy expected_version, this will error.