'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'

def ensure_has_source_dir(self, parent_dir):

    if (self.source_dir is None):
        self.source_dir = self.build_location(parent_dir)
    return self.source_dir
