'Move self._temp_build_dir to self._ideal_build_dir/self.req.name
For some requirements (e.g. a path to a directory), the name of the
package is not available until we run egg_info, so the build_location
will return a temporary directory and store the _ideal_build_dir.
This is only called by self.egg_info_path to fix the temporary build
directory.'

def _correct_build_location(self):

    if (self.source_dir is not None):
        return
    assert (self.req is not None)
    assert self._temp_build_dir
    assert self._ideal_build_dir
    old_location = self._temp_build_dir
    self._temp_build_dir = None
    new_location = self.build_location(self._ideal_build_dir)
    if os.path.exists(new_location):
        raise InstallationError(('A    package    already    exists    in    %s;    please    remove    it    to    continue' % display_path(new_location)))
    logger.debug('Moving    package    %s    from    %s    to    new    location    %s', self, display_path(old_location), display_path(new_location))
    shutil.move(old_location, new_location)
    self._temp_build_dir = new_location
    self._ideal_build_dir = None
    self.source_dir = new_location
    self._egg_info_path = None
