diff --git a/python/shotgun_desktop/startup.py b/python/shotgun_desktop/startup.py index 03bdd282..8e095b59 100644 --- a/python/shotgun_desktop/startup.py +++ b/python/shotgun_desktop/startup.py @@ -17,31 +17,6 @@ # initialize logging import logging -# The value of sys.executable under multiple platforms and multiple versions -# of Desktop is unreliable. Therefore, we're patch the value if the executable -# name is not Shotgun or ShotGrid. -# -# So, we'll use sys.prefix which is properly set and backtrack to the executable. -# When the executable is fixed we should come back here and put a check for the version -# number so we stop updating sys.executable - -# Grab the name and the executable -executable_name, ext = os.path.splitext(os.path.basename(sys.executable or "")) - -# If the executable is not named Shotgun or ShotGrid, then we need to patch sys.executable. -if executable_name.lower() not in ["shotgun", "shotgrid"]: - # On macOS, sys.prefix is set to /Applications/Shotgun.app/Contents/Resources/python, - # so we need to drill down differently for the executable folder than on other platforms - if sys.platform == "darwin": - bin_dir = os.path.join(sys.prefix, "..", "..", "MacOS") - else: - # On Linux and Windows, the sys.prefix points to Shotgun/Python, so we only - # need to move up one folder. - bin_dir = os.path.join(sys.prefix, "..") - - # Set the executable name and make sure to put back in the extension for Windows. - sys.executable = os.path.normpath(os.path.join(bin_dir, "Shotgun%s" % ext)) - def _enumerate_per_line(items): """