parameters: (
  
          self,
  
          parent_dir,
  
          autodelete=False,
  
          parallel_builds=False,
  
      )
docstring: Ensure that a source_dir is set.
  
  
  
          This will create a temporary build dir if the name of the requirement
  
          isn't known yet.
  
  
  
          :param parent_dir: The ideal pip parent_dir for the source_dir.
  
              Generally src_dir for editables and build_dir for sdists.
  
          :return: self.source_dir
docstring_summary: Ensure that a source_dir is set.
docstring_tokens: Ensure that a source_dir is set .
function: def ensure_has_source_dir(
  
          self,
  
          parent_dir,
  
          autodelete=False,
  
          parallel_builds=False,
  
      ):
  
          # type: (str, bool, bool) -> None
  
          """Ensure that a source_dir is set.
  
  
  
          This will create a temporary build dir if the name of the requirement
  
          isn't known yet.
  
  
  
          :param parent_dir: The ideal pip parent_dir for the source_dir.
  
              Generally src_dir for editables and build_dir for sdists.
  
          :return: self.source_dir
  
          """
  
          if self.source_dir is None:
  
              self.source_dir = self.ensure_build_location(
  
                  parent_dir,
  
                  autodelete=autodelete,
  
                  parallel_builds=parallel_builds,
  
              )
function_tokens: def ensure_has_source_dir ( self , parent_dir , autodelete = False , parallel_builds = False , ) : # type: (str, bool, bool) -> None if self . source_dir is None : self . source_dir = self . ensure_build_location ( parent_dir , autodelete = autodelete , parallel_builds = parallel_builds , )