Skip to content

Commit

Permalink
Fix glob directory
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaScheller committed Mar 21, 2024
1 parent 19680b9 commit 9799ea1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/maya.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 9799ea1

Please sign in to comment.