diff options
author | Simon Edwards <s.edwards@ultimaker.com> | 2017-02-27 15:36:20 +0300 |
---|---|---|
committer | Simon Edwards <s.edwards@ultimaker.com> | 2017-02-27 15:38:05 +0300 |
commit | 8602d984a9caf73dc40168e0e7937c9e930d035b (patch) | |
tree | 849c923e67d27b742ae6afcf7d92198180b10b80 /cura_app.py | |
parent | 8237421bcfcd8435fd6d9e883764064386cbe186 (diff) |
Stop $PYTHONPATH from messing up the search path for DLLs.
CURA-3418 Cura build on Win 64 fails due to $PYTHONPATH
Diffstat (limited to 'cura_app.py')
-rwxr-xr-x | cura_app.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cura_app.py b/cura_app.py index 633110eff8..989c45b37a 100755 --- a/cura_app.py +++ b/cura_app.py @@ -17,6 +17,12 @@ if Platform.isLinux(): # Needed for platform.linux_distribution, which is not av libGL = find_library("GL") ctypes.CDLL(libGL, ctypes.RTLD_GLOBAL) +# When frozen, i.e. installer version, don't let PYTHONPATH mess up the search path for DLLs. +if Platform.isWindows() and hasattr(sys, "frozen"): + try: + del os.environ["PYTHONPATH"] + except KeyError: pass + #WORKAROUND: GITHUB-704 GITHUB-708 # It looks like setuptools creates a .pth file in # the default /usr/lib which causes the default site-packages |