From e19f1433ea4a71dd7a983ad293cd7608a225c8b2 Mon Sep 17 00:00:00 2001 From: "dr.lt.data" Date: Mon, 18 Sep 2023 11:41:34 +0900 Subject: [PATCH] colab-dependencies patch --- scripts/colab-dependencies.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/colab-dependencies.py b/scripts/colab-dependencies.py index 76d25153..48ad218b 100644 --- a/scripts/colab-dependencies.py +++ b/scripts/colab-dependencies.py @@ -5,14 +5,17 @@ import subprocess def get_enabled_subdirectories_with_files(base_directory): subdirs_with_files = [] for subdir in os.listdir(base_directory): - full_path = os.path.join(base_directory, subdir) - if os.path.isdir(full_path) and not subdir.endswith(".disabled") and not subdir.startswith('.') and subdir != '__pycache__': - print(f"## Install dependencies for '{subdir}'") - requirements_file = os.path.join(full_path, "requirements.txt") - install_script = os.path.join(full_path, "install.py") + try: + full_path = os.path.join(base_directory, subdir) + if os.path.isdir(full_path) and not subdir.endswith(".disabled") and not subdir.startswith('.') and subdir != '__pycache__': + print(f"## Install dependencies for '{subdir}'") + requirements_file = os.path.join(full_path, "requirements.txt") + install_script = os.path.join(full_path, "install.py") - if os.path.isfile(requirements_file) and os.path.isfile(install_script): - subdirs_with_files.append((full_path, requirements_file, install_script)) + if os.path.isfile(requirements_file) and os.path.isfile(install_script): + subdirs_with_files.append((full_path, requirements_file, install_script)) + except Exception as e: + print(f"EXCEPTION During Dependencies INSTALL on '{subdir}':\n{e}") return subdirs_with_files