(home_dir, symlink=True)
Platforms that use the "posix_local" install scheme (like Ubuntu with
    Python 2.7) need to be given an additional "local" location, sigh.
Platforms that use the "posix_local" install scheme (like Ubuntu with
    Python 2.7) need to be given an additional "local" location, sigh.
Platforms that use the posix_local install scheme ( like Ubuntu with Python 2 . 7 ) need to be given an additional local location sigh .
def fix_local_scheme(home_dir, symlink=True):
    """
    Platforms that use the "posix_local" install scheme (like Ubuntu with
    Python 2.7) need to be given an additional "local" location, sigh.
    """
    try:
        import sysconfig
    except ImportError:
        pass
    else:
        if sysconfig._get_default_scheme() == 'posix_local':
            local_path = os.path.join(home_dir, 'local')
            if not os.path.exists(local_path):
                os.mkdir(local_path)
                for subdir_name in os.listdir(home_dir):
                    if subdir_name == 'local':
                        continue
                    copyfile(os.path.abspath(os.path.join(home_dir, subdir_name)), \
                                                            os.path.join(local_path, subdir_name), symlink)
def fix_local_scheme ( home_dir , symlink = True ) : try : import sysconfig except ImportError : pass else : if sysconfig . _get_default_scheme ( ) == 'posix_local' : local_path = os . path . join ( home_dir , 'local' ) if not os . path . exists ( local_path ) : os . mkdir ( local_path ) for subdir_name in os . listdir ( home_dir ) : if subdir_name == 'local' : continue copyfile ( os . path . abspath ( os . path . join ( home_dir , subdir_name ) ) , os . path . join ( local_path , subdir_name ) , symlink )