parameters: (
  
          self,
  
          req,  # type: InstallRequirement
  
      )
return_statement: return dist
docstring: Prepare an editable requirement
docstring_summary: Prepare an editable requirement
docstring_tokens: Prepare an editable requirement
function: def prepare_editable_requirement(
  
          self,
  
          req,  # type: InstallRequirement
  
      ):
  
          # type: (...) -> Distribution
  
          """Prepare an editable requirement
  
          """
  
          assert req.editable, "cannot prepare a non-editable req as editable"
  
  
  
          logger.info('Obtaining %s', req)
  
  
  
          with indent_log():
  
              if self.require_hashes:
  
                  raise InstallationError(
  
                      'The editable requirement {} cannot be installed when '
  
                      'requiring hashes, because there is no single file to '
  
                      'hash.'.format(req)
  
                  )
  
              req.ensure_has_source_dir(self.src_dir)
  
              req.update_editable()
  
  
  
              dist = _get_prepared_distribution(
  
                  req, self.req_tracker, self.finder, self.build_isolation,
  
              )
  
  
  
              req.check_if_exists(self.use_user_site)
  
  
  
          return dist
function_tokens: def prepare_editable_requirement ( self , req , # type: InstallRequirement ) : # type: (...) -> Distribution assert req . editable , "cannot prepare a non-editable req as editable" logger . info ( 'Obtaining %s' , req ) with indent_log ( ) : if self . require_hashes : raise InstallationError ( 'The editable requirement {} cannot be installed when ' 'requiring hashes, because there is no single file to ' 'hash.' . format ( req ) ) req . ensure_has_source_dir ( self . src_dir ) req . update_editable ( ) dist = _get_prepared_distribution ( req , self . req_tracker , self . finder , self . build_isolation , ) req . check_if_exists ( self . use_user_site ) return dist