From 976a2ff469cd02a80a35a2e8a8bb215b585b9857 Mon Sep 17 00:00:00 2001 From: maaktweluit <10008353+maaktweluit@users.noreply.github.com> Date: Wed, 29 Jan 2020 11:59:25 +0100 Subject: [PATCH] Follow symlinks for sys.executable --- apps/blender/benchmark/benchmark.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/blender/benchmark/benchmark.py b/apps/blender/benchmark/benchmark.py index 638a08b41c..ca11d995f7 100644 --- a/apps/blender/benchmark/benchmark.py +++ b/apps/blender/benchmark/benchmark.py @@ -3,7 +3,7 @@ import tempfile from typing import Type -from os.path import dirname, join +from os.path import dirname, join, realpath from os import close from apps.blender.blenderenvironment import BlenderEnvironment, \ @@ -22,7 +22,8 @@ def __init__(self): super(BlenderBenchmark, self).__init__() self._normalization_constant = 9360 if hasattr(sys, 'frozen') and sys.frozen: - self.blender_task_path = join(dirname(sys.executable), + real_exe_path = realpath(sys.executable) + self.blender_task_path = join(dirname(real_exe_path), 'examples', 'blender') else: this_dir = pathlib.Path(__file__).resolve().parent