def correct_build_location(self):
if self.source_dir is not None:<EOL><INDENT>return<EOL><DEDENT>assert self.req is not None<EOL>assert self._temp_build_dir<EOL>old_location = self._temp_build_dir<EOL>new_build_dir = self._ideal_build_dir<EOL>del self._ideal_build_dir<EOL>if self.editable:<EOL><INDENT>name = self.name.lower()<EOL><DEDENT>else:<EOL><INDENT>name = self.name<EOL><DEDENT>new_location = os.path.join(new_build_dir, name)<EOL>if not os.path.exists(new_build_dir):<EOL><INDENT>logger.debug('<STR_LIT>', new_build_dir)<EOL>_make_build_dir(new_build_dir)<EOL><DEDENT>if os.path.exists(new_location):<EOL><INDENT>raise InstallationError(<EOL>'<STR_LIT>'<EOL>% display_path(new_location))<EOL><DEDENT>logger.debug(<EOL>'<STR_LIT>',<EOL>self, display_path(old_location), display_path(new_location),<EOL>)<EOL>shutil.move(old_location, new_location)<EOL>self._temp_build_dir = new_location<EOL>self.source_dir = new_location<EOL>self._egg_info_path = None<EOL>
If the build location was a temporary directory, this will move it
        to a new more permanent location