(
        self,
        req,  # type: InstallRequirement
        require_hashes,  # type: bool
        skip_reason  # type: str
    )
return abstract_dist
Prepare an already-installed requirement
Prepare an already-installed requirement
Prepare an already - installed requirement
def prepare_installed_requirement(
        self,
        req,  # type: InstallRequirement
        require_hashes,  # type: bool
        skip_reason  # type: str
    ):
        # type: (...) -> AbstractDistribution
        """Prepare an already-installed requirement
        """
        assert req.satisfied_by, "req should have been satisfied but isn't"
        assert skip_reason is not None, (
            "did not get skip reason skipped but req.satisfied_by "
            "is set to %r" % (req.satisfied_by,)
        )
        logger.info(
            'Requirement %s: %s (%s)',
            skip_reason, req, req.satisfied_by.version
        )
        with indent_log():
            if require_hashes:
                logger.debug(
                    'Since it is already installed, we are trusting this '
                    'package without checking its hash. To ensure a '
                    'completely repeatable environment, install into an '
                    'empty virtualenv.'
                )
            abstract_dist = InstalledDistribution(req)

        return abstract_dist
def prepare_installed_requirement ( self , req , # type: InstallRequirement require_hashes , # type: bool skip_reason # type: str ) : # type: (...) -> AbstractDistribution assert req . satisfied_by , "req should have been satisfied but isn't" assert skip_reason is not None , ( "did not get skip reason skipped but req.satisfied_by " "is set to %r" % ( req . satisfied_by , ) ) logger . info ( 'Requirement %s: %s (%s)' , skip_reason , req , req . satisfied_by . version ) with indent_log ( ) : if require_hashes : logger . debug ( 'Since it is already installed, we are trusting this ' 'package without checking its hash. To ensure a ' 'completely repeatable environment, install into an ' 'empty virtualenv.' ) abstract_dist = InstalledDistribution ( req ) return abstract_dist