Skip to content

Commit

Permalink
🎨 add support of 3de4 home dir as env
Browse files Browse the repository at this point in the history
  • Loading branch information
antirotor committed Feb 22, 2024
1 parent f06e13d commit 8798636
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions openpype/hosts/equalizer/hooks/pre_pyside2_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,18 @@ def _execute(self):
if platform == "windows":
expected_executable += ".exe"

if executable.name.lower() != expected_executable:
self.log.info((
f"Executable {executable.as_posix()} does not lead "
f"to {expected_executable} file. "
"Can't determine 3dequalizer's python to "
f"check/install PySide2. {executable.name}"
))
return

python_dir = executable.parent.parent / "sys_data" / "py37_inst"
if not self.launch_context.env.get("TDE4_HOME"):
if executable.name.lower() != expected_executable:
self.log.warning((
f"Executable {executable.as_posix()} does not lead "
f"to {expected_executable} file. "
"Can't determine 3dequalizer's python to "
f"check/install PySide2. {executable.name}"
))
return
python_dir = executable.parent.parent / "sys_data" / "py37_inst"
else:
python_dir = Path(self.launch_context.env["TDE4_HOME"]) / "sys_data" / "py37_inst" # noqa: E501

if platform == "windows":
python_executable = python_dir / "python.exe"
Expand Down

0 comments on commit 8798636

Please sign in to comment.