From cfeb4910a1dd7eb099aa71bc1aaa075d8db1aa11 Mon Sep 17 00:00:00 2001 From: Luca Scheller Date: Wed, 20 Mar 2024 22:12:09 -0700 Subject: [PATCH] Fix python interpreter of tests --- .github/scripts/maya.py | 6 +++--- build.sh | 0 setup.sh | 2 +- src/PythonResolver/CMakeLists.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) mode change 100644 => 100755 build.sh diff --git a/.github/scripts/maya.py b/.github/scripts/maya.py index b74239e..aeb72b5 100644 --- a/.github/scripts/maya.py +++ b/.github/scripts/maya.py @@ -179,11 +179,11 @@ def install_autodesk_product(product, version, install_dir_path): os.chmod(python_configure_file_path, 0o777) logging.info("Configuring Python Build") command = [python_configure_file_path, "--enable-shared", "--prefix", python_install_dir_path] - process = subprocess.check_call(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=python_version_dir_path) + process = subprocess.check_call(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=python_version_dir_path) logging.info("Building Python") process = subprocess.check_call(["make"], stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, cwd=python_version_dir_path) logging.info("Installing Python") - process = subprocess.check_call(["make", "install"], stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, cwd=python_version_dir_path) + process = subprocess.check_call(["make", "install"], stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, cwd=python_version_dir_path) # Maya USD SDK maya_usd_sdk_releases = get_autodesk_maya_usd_sdk_releases(autodesk_platform, autodesk_maya_version) maya_usd_sdk_latest_release = maya_usd_sdk_releases[0] @@ -202,7 +202,7 @@ def install_autodesk_product(product, version, install_dir_path): # 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", "--nodeps","--prefix", maya_usd_sdk_extract_dir_path, maya_usd_sdk_extract_rpm_file_path] - process = subprocess.check_call(command, cwd=maya_usd_sdk_extract_dir_path) + process = subprocess.check_call(command, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, 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) diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 diff --git a/setup.sh b/setup.sh index a5b4690..34106e9 100644 --- a/setup.sh +++ b/setup.sh @@ -5,7 +5,7 @@ then export REPO_SOURCED=1 export REPO_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")" &> /dev/null && (pwd -W 2> /dev/null || pwd)) # Define Resolver > Has to be one of 'fileResolver'/'pythonResolver'/'cachedResolver'/'httpResolver' - export AR_RESOLVER_NAME=cachedResolver + export AR_RESOLVER_NAME=pythonResolver export AR_RESOLVER_NAME_UPPERCASE=$(echo ${AR_RESOLVER_NAME} | tr '[:lower:]' '[:upper:]') # DCC export AR_DCC_NAME=HOUDINI diff --git a/src/PythonResolver/CMakeLists.txt b/src/PythonResolver/CMakeLists.txt index 0bfdd35..74ba186 100644 --- a/src/PythonResolver/CMakeLists.txt +++ b/src/PythonResolver/CMakeLists.txt @@ -118,7 +118,7 @@ set(TESTS_ENV_LD_LIBRARY_PATH "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${AR_PYTH set(TESTS_ENV_AR_SEARCH_PATHS "AR_SEARCH_PATHS=/env/search/pathA:/env/search/pathB") set(TESTS_ENV_AR_SEARCH_REGEX_EXPRESSION "AR_SEARCH_REGEX_EXPRESSION=(v\\d\\d\\d)") set(TESTS_ENV_AR_SEARCH_REGEX_FORMAT "AR_SEARCH_REGEX_FORMAT=v000") -set(TESTS_PYTHON_COMMAND $ENV{HFS}/python/bin/python -B -m unittest discover ${TESTS_SOURCE_DIR}) +set(TESTS_PYTHON_COMMAND ${AR_PYTHON_EXECUTABLE} -B -m unittest discover ${TESTS_SOURCE_DIR}) add_test( NAME testPythonResolver