(
        self,
        req,  # type: InstallRequirement
        require_hashes,  # type: bool
        use_user_site,  # type: bool
        finder  # type: PackageFinder
    )
return abstract_dist
Prepare an editable requirement
Prepare an editable requirement
Prepare an editable requirement
def prepare_editable_requirement(
        self,
        req,  # type: InstallRequirement
        require_hashes,  # type: bool
        use_user_site,  # type: bool
        finder  # type: PackageFinder
    ):
        # type: (...) -> AbstractDistribution
        """Prepare an editable requirement
        """
        assert req.editable, "cannot prepare a non-editable req as editable"

        logger.info('Obtaining %s', req)

        with indent_log():
            if require_hashes:
                raise InstallationError(
                    'The editable requirement %s cannot be installed when '
                    'requiring hashes, because there is no single file to '
                    'hash.' % req
                )
            req.ensure_has_source_dir(self.src_dir)
            req.update_editable(not self._download_should_save)

            abstract_dist = make_distribution_for_install_requirement(req)
            with self.req_tracker.track(req):
                abstract_dist.prepare_distribution_metadata(
                    finder, self.build_isolation,
                )

            if self._download_should_save:
                req.archive(self.download_dir)
            req.check_if_exists(use_user_site)

        return abstract_dist
def prepare_editable_requirement ( self , req , # type: InstallRequirement require_hashes , # type: bool use_user_site , # type: bool finder # type: PackageFinder ) : # type: (...) -> AbstractDistribution assert req . editable , "cannot prepare a non-editable req as editable" logger . info ( 'Obtaining %s' , req ) with indent_log ( ) : if require_hashes : raise InstallationError ( 'The editable requirement %s cannot be installed when ' 'requiring hashes, because there is no single file to ' 'hash.' % req ) req . ensure_has_source_dir ( self . src_dir ) req . update_editable ( not self . _download_should_save ) abstract_dist = make_distribution_for_install_requirement ( req ) with self . req_tracker . track ( req ) : abstract_dist . prepare_distribution_metadata ( finder , self . build_isolation , ) if self . _download_should_save : req . archive ( self . download_dir ) req . check_if_exists ( use_user_site ) return abstract_dist