def get_requirements_information(self, path: Path) -> Tuple[RequirementsOptions, Optional[str]]:
if self.pipfile_location is not None:<EOL><INDENT>pipfile = path / self.pipfile_location / "<STR_LIT>"<EOL>pipfile_lock = path / self.pipfile_location / "<STR_LIT>"<EOL>pipfile_exists = pipfile.exists()<EOL>pipfile_lock_exists = pipfile_lock.exists()<EOL>if pipfile_exists and pipfile_lock_exists:<EOL><INDENT>option = RequirementsOptions.pipfile<EOL>return option, self.hash_file_contents(option, pipfile_lock)<EOL><DEDENT>elif pipfile_exists:<EOL><INDENT>raise BuildError("<STR_LIT>")<EOL><DEDENT>elif pipfile_lock_exists:<EOL><INDENT>raise BuildError("<STR_LIT>")<EOL><DEDENT><DEDENT>if self.requirements_location:<EOL><INDENT>requirements_file = path / self.requirements_location<EOL>if requirements_file.exists():<EOL><INDENT>option = RequirementsOptions.requirements_txt<EOL>return option, self.hash_file_contents(option, requirements_file)<EOL><DEDENT><DEDENT>return RequirementsOptions.no_requirements, None<EOL>
Returns the information needed to install requirements for a repository - what kind is used and the hash
of contents of the defining file.