'Call the given Python and return:
(<version>, <sys.prefix>, <lib-dir>, <site-lib-dir>, <sys.path>)
TODO: Unicode path issues?'

def _python_info_from_python(self, python, env):

    import process
    argv = [python, '-c', self.info_cmd]
    log.debug("run    `%s    -c    ...'", python)
    p = process.ProcessOpen(argv, env=env.get_all_envvars(), stdin=None)
    (stdout, stderr) = p.communicate()
    stdout_lines = stdout.splitlines(0)
    retval = p.returncode
    if retval:
        log.warn('failed    to    determine    Python    info:\n        path:    %s\n        retval:    %s\n        stdout:\n%s\n        stderr:\n%s\n', python, retval, indent('\n'.join(stdout_lines)), indent(stderr))
    ver_match = re.search('([0-9]+.[0-9]+)', stdout_lines[0])
    if ver_match:
        ver = ver_match.group(1)
    else:
        ver = None
    prefix = stdout_lines[1]
    if (sys.platform == 'win32'):
        libdir = join(prefix, 'Lib')
    else:
        libdir = join(prefix, 'lib', ('python' + ver))
    sitelibdir = join(libdir, 'site-packages')
    sys_path = stdout_lines[2:]
    return (ver, prefix, libdir, sitelibdir, sys_path)
