def path_locations(home_dir):
<EOL>if is_win:<EOL><INDENT>mkdir(home_dir)<EOL>if '<STR_LIT:U+0020>' in home_dir:<EOL><INDENT>import ctypes<EOL>GetShortPathName = ctypes.windll.kernel32.GetShortPathNameW<EOL>size = max(len(home_dir)+<NUM_LIT:1>, <NUM_LIT>)<EOL>buf = ctypes.create_unicode_buffer(size)<EOL>try:<EOL><INDENT>u = unicode<EOL><DEDENT>except NameError:<EOL><INDENT>u = str<EOL><DEDENT>ret = GetShortPathName(u(home_dir), buf, size)<EOL>if not ret:<EOL><INDENT>print('<STR_LIT>' % home_dir)<EOL>print('<STR_LIT>')<EOL>print('<STR_LIT>')<EOL>sys.exit(<NUM_LIT:3>)<EOL><DEDENT>home_dir = str(buf.value)<EOL><DEDENT>lib_dir = join(home_dir, '<STR_LIT>')<EOL>inc_dir = join(home_dir, '<STR_LIT>')<EOL>bin_dir = join(home_dir, '<STR_LIT>')<EOL><DEDENT>if is_jython:<EOL><INDENT>lib_dir = join(home_dir, '<STR_LIT>')<EOL>inc_dir = join(home_dir, '<STR_LIT>')<EOL>bin_dir = join(home_dir, '<STR_LIT>')<EOL><DEDENT>elif is_pypy:<EOL><INDENT>lib_dir = home_dir<EOL>inc_dir = join(home_dir, '<STR_LIT>')<EOL>bin_dir = join(home_dir, '<STR_LIT>')<EOL><DEDENT>elif not is_win:<EOL><INDENT>lib_dir = join(home_dir, '<STR_LIT>', py_version)<EOL>multiarch_exec = '<STR_LIT>'<EOL>if is_executable_file(multiarch_exec):<EOL><INDENT>p = subprocess.Popen(multiarch_exec, stdout=subprocess.PIPE, stderr=subprocess.PIPE)<EOL>stdout, stderr = p.communicate()<EOL>inc_dir = join(home_dir, '<STR_LIT>', stdout.strip(), py_version + abiflags)<EOL><DEDENT>else:<EOL><INDENT>inc_dir = join(home_dir, '<STR_LIT>', py_version + abiflags)<EOL><DEDENT>bin_dir = join(home_dir, '<STR_LIT>')<EOL><DEDENT>return home_dir, lib_dir, inc_dir, bin_dir<EOL>
Return the path locations for the environment (where libraries are,
    where scripts go, etc)