'Return path to env.sh file in required repository if the required repository has been installed.'

def get_required_repository_package_env_sh_path(self, package_name, package_version, required_repository):

    env_sh_file_dir = tool_dependency_util.get_tool_dependency_install_dir(app=self.app, repository_name=required_repository.name, repository_owner=required_repository.owner, repository_changeset_revision=required_repository.installed_changeset_revision, tool_dependency_type='package', tool_dependency_name=package_name, tool_dependency_version=package_version)
    env_sh_file_path = os.path.join(env_sh_file_dir, 'env.sh')
    return env_sh_file_path
