From 9799ea1a1a8f7f9d7c2a7db9d917ea81a3fd11cc Mon Sep 17 00:00:00 2001 From: Luca Scheller Date: Wed, 20 Mar 2024 21:51:56 -0700 Subject: [PATCH] Fix glob directory --- .github/scripts/maya.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/scripts/maya.py b/.github/scripts/maya.py index 456eda9..5f7032d 100644 --- a/.github/scripts/maya.py +++ b/.github/scripts/maya.py @@ -199,10 +199,10 @@ def install_autodesk_product(product, version, install_dir_path): process = subprocess.check_call(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) maya_usd_sdk_extract_rpm_file_name = [f for f in os.listdir(maya_usd_sdk_extract_dir_path) if f.endswith(".rpm")][0] maya_usd_sdk_extract_rpm_file_path = os.path.join(maya_usd_sdk_extract_dir_path, maya_usd_sdk_extract_rpm_file_name) - command = ["rpm", "-e", maya_usd_sdk_extract_rpm_file_name.replace(".rpm", "")] - process = subprocess.check_call(command ) + # command = ["rpm", "-e", maya_usd_sdk_extract_rpm_file_name.replace(".rpm", "")] + # process = subprocess.check_call(command, cwd=maya_usd_sdk_extract_dir_path) command = ["rpm", "-i", "--prefix", maya_usd_sdk_extract_dir_path, maya_usd_sdk_extract_rpm_file_path] - process = subprocess.check_call(command) + process = subprocess.check_call(command, cwd=maya_usd_sdk_extract_dir_path) maya_usd_sdk_extract_usd_dir_path = glob.glob("{root_dir}{sep}**{sep}mayausd{sep}USD".format(root_dir=maya_usd_sdk_extract_dir_path, sep=os.path.sep), recursive=True)[0] maya_usd_sdk_extract_usd_dir_path = os.path.join(maya_usd_sdk_extract_dir_path, maya_usd_sdk_extract_usd_dir_path) os.rename(maya_usd_sdk_extract_usd_dir_path, maya_usd_sdk_install_dir_path) @@ -252,7 +252,7 @@ def install_autodesk_product(product, version, install_dir_path): os.rename(maya_usd_sdk_extract_usd_dir_path, maya_usd_sdk_install_dir_path) # Maya USD DevKit logging.info("Installing Maya USD SDK DevKit") - maya_usd_sdk_devkit_zip_file_path = glob.glob("{root_dir}{sep}**{sep}devkit.zip".format(root_dir=maya_usd_sdk_extract_dir_path, sep=os.path.sep), recursive=True) + maya_usd_sdk_devkit_zip_file_path = glob.glob("{root_dir}{sep}**{sep}devkit.zip".format(root_dir=maya_usd_sdk_install_dir_path, sep=os.path.sep), recursive=True) maya_usd_sdk_devkit_zip_file_path = os.path.join(maya_usd_sdk_install_dir_path, maya_usd_sdk_devkit_zip_file_path[0]) with zipfile.ZipFile(maya_usd_sdk_devkit_zip_file_path, 'r') as zip_file: zip_file.extractall(maya_usd_sdk_devkit_install_dir_path)