virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py
def correct_build_location(self):
        """If the build location was a temporary directory, this will move it
        to a new more permanent location"""
        if self.source_dir is not None:
            return
        assert self.req is not None
        assert self._temp_build_dir
        old_location = self._temp_build_dir
        new_build_dir = self._ideal_build_dir
        del self._ideal_build_dir
        if self.editable:
            name = self.name.lower()
        else:
            name = self.name
        new_location = os.path.join(new_build_dir, name)
        if not os.path.exists(new_build_dir):
            logger.debug('Creating directory %s', new_build_dir)
            _make_build_dir(new_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.source_dir = new_location
        self._egg_info_path = None
def correct_build_location(self):
        if self.source_dir is not None:
            return
        assert self.req is not None
        assert self._temp_build_dir
        old_location = self._temp_build_dir
        new_build_dir = self._ideal_build_dir
        del self._ideal_build_dir
        if self.editable:
            name = self.name.lower()
        else:
            name = self.name
        new_location = os.path.join(new_build_dir, name)
        if not os.path.exists(new_build_dir):
            logger.debug('Creating directory %s', new_build_dir)
            _make_build_dir(new_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.source_dir = new_location
        self._egg_info_path = None
def correct_build_location ( self ) : if self . source_dir is not None : return assert self . req is not None assert self . _temp_build_dir old_location = self . _temp_build_dir new_build_dir = self . _ideal_build_dir del self . _ideal_build_dir if self . editable : name = self . name . lower ( ) else : name = self . name new_location = os . path . join ( new_build_dir , name ) if not os . path . exists ( new_build_dir ) : logger . debug ( 'Creating directory %s' , new_build_dir ) _make_build_dir ( new_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 . source_dir = new_location self . _egg_info_path = None
If the build location was a temporary directory, this will move it
        to a new more permanent location
If the build location was a temporary directory this will move it to a new more permanent location