From 48173895368c60fea23c2f7dcd865b82f578ad05 Mon Sep 17 00:00:00 2001 From: Diego Garcia Gangl Date: Tue, 21 Sep 2021 20:19:05 -0300 Subject: [PATCH] Update Blender plugin to Python 3.9 --- Pandora/Plugins/Apps/Blender/Integration/PandoraInit.py | 8 ++++---- Pandora/Scripts/PandoraCoordinator.py | 2 +- Pandora/Scripts/PandoraCore.py | 8 ++++---- Pandora/Scripts/PandoraInstaller.py | 2 +- Pandora/Scripts/PandoraRenderHandler.py | 2 +- Pandora/Scripts/PandoraSettings.py | 2 +- Pandora/Scripts/PandoraSlave.py | 2 +- Pandora/Scripts/PandoraTray.py | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Pandora/Plugins/Apps/Blender/Integration/PandoraInit.py b/Pandora/Plugins/Apps/Blender/Integration/PandoraInit.py index 9704a16..7c33686 100644 --- a/Pandora/Plugins/Apps/Blender/Integration/PandoraInit.py +++ b/Pandora/Plugins/Apps/Blender/Integration/PandoraInit.py @@ -36,12 +36,12 @@ pandoraRoot = PANDORAROOT -if sys.version_info[0] != 3 and sys.version_info[1] != 7: - print("Pandora supports Python37 only in Blender") +if sys.version_info[0] != 3 and sys.version_info[1] != 9: + print("Pandora supports Python39 only in Blender") sys.path.insert(0, os.path.join(pandoraRoot, "PythonLibs", "CrossPlatform")) -sys.path.insert(0, os.path.join(pandoraRoot, "PythonLibs", "Python37")) -sys.path.insert(0, os.path.join(pandoraRoot, "PythonLibs", "Python37", "PySide")) +sys.path.insert(0, os.path.join(pandoraRoot, "PythonLibs", "Python39")) +sys.path.insert(0, os.path.join(pandoraRoot, "PythonLibs", "Python39", "PySide")) sys.path.insert(0, os.path.join(pandoraRoot, "Scripts")) from PySide2.QtCore import * diff --git a/Pandora/Scripts/PandoraCoordinator.py b/Pandora/Scripts/PandoraCoordinator.py index f853e3d..ebc0132 100644 --- a/Pandora/Scripts/PandoraCoordinator.py +++ b/Pandora/Scripts/PandoraCoordinator.py @@ -39,7 +39,7 @@ from functools import wraps if sys.version[0] == "3": - pyLibs = "Python37" + pyLibs = "Python39" pVersion = 3 else: pyLibs = "Python27" diff --git a/Pandora/Scripts/PandoraCore.py b/Pandora/Scripts/PandoraCore.py index bc3c457..49f2719 100644 --- a/Pandora/Scripts/PandoraCore.py +++ b/Pandora/Scripts/PandoraCore.py @@ -38,7 +38,7 @@ # check if python 2 or python 3 is used if sys.version[0] == "3": - pyLibs = "Python37" + pyLibs = "Python39" pVersion = 3 else: pyLibs = "Python27" @@ -1826,7 +1826,7 @@ def handleRemoveReadonly(self, func, path, exc): @err_decorator def getPythonPath(self): if platform.system() == "Windows": - pythonPath = os.path.join(self.pandoraRoot, "Python37", "pythonw.exe") + pythonPath = os.path.join(self.pandoraRoot, "Python39", "pythonw.exe") if not os.path.exists(pythonPath): pythonPath = os.path.join(self.pandoraRoot, "Python27", "pythonw.exe") if not os.path.exists(pythonPath): @@ -1854,7 +1854,7 @@ def sendEmail(self, text, subject="Pandora Error", quiet=False): try: if platform.system() == "Windows": - pythonPath = os.path.join(self.pandoraRoot, "Python37", "pythonw.exe") + pythonPath = os.path.join(self.pandoraRoot, "Python39", "pythonw.exe") if not os.path.exists(pythonPath): pythonPath = os.path.join(os.path.dirname(sys.executable), "pythonw.exe") if not os.path.exists(pythonPath): @@ -1949,7 +1949,7 @@ def checkForUpdates(self, silent=False): try: import os, sys - pyLibs = os.path.join('%s', 'PythonLibs', 'Python37') + pyLibs = os.path.join('%s', 'PythonLibs', 'Python39') if pyLibs not in sys.path: sys.path.insert(0, pyLibs) diff --git a/Pandora/Scripts/PandoraInstaller.py b/Pandora/Scripts/PandoraInstaller.py index 8fa2347..997fdf8 100644 --- a/Pandora/Scripts/PandoraInstaller.py +++ b/Pandora/Scripts/PandoraInstaller.py @@ -35,7 +35,7 @@ if sys.version[0] == "3": pVersion = 3 - pyLibs = "Python37" + pyLibs = "Python39" else: pVersion = 2 pyLibs = "Python27" diff --git a/Pandora/Scripts/PandoraRenderHandler.py b/Pandora/Scripts/PandoraRenderHandler.py index 152b70c..a47d5c5 100644 --- a/Pandora/Scripts/PandoraRenderHandler.py +++ b/Pandora/Scripts/PandoraRenderHandler.py @@ -42,7 +42,7 @@ sys.path.append(scriptPath) if sys.version[0] == "3": - pyLibs = "Python37" + pyLibs = "Python39" pVersion = 3 else: pyLibs = "Python27" diff --git a/Pandora/Scripts/PandoraSettings.py b/Pandora/Scripts/PandoraSettings.py index ce94bad..05d3b59 100644 --- a/Pandora/Scripts/PandoraSettings.py +++ b/Pandora/Scripts/PandoraSettings.py @@ -42,7 +42,7 @@ sys.path.append(scriptPath) if sys.version[0] == "3": - pyLibs = "Python37" + pyLibs = "Python39" pVersion = 3 else: pyLibs = "Python27" diff --git a/Pandora/Scripts/PandoraSlave.py b/Pandora/Scripts/PandoraSlave.py index b0b5253..d13482f 100644 --- a/Pandora/Scripts/PandoraSlave.py +++ b/Pandora/Scripts/PandoraSlave.py @@ -42,7 +42,7 @@ sys.path.append(scriptPath) if sys.version[0] == "3": - pyLibs = "Python37" + pyLibs = "Python39" pVersion = 3 else: pyLibs = "Python27" diff --git a/Pandora/Scripts/PandoraTray.py b/Pandora/Scripts/PandoraTray.py index 893aa82..b0a9040 100644 --- a/Pandora/Scripts/PandoraTray.py +++ b/Pandora/Scripts/PandoraTray.py @@ -34,7 +34,7 @@ import sys, os, subprocess, shutil, socket if sys.version[0] == "3": - pyLibs = "Python37" + pyLibs = "Python39" pVersion = 3 else: pyLibs = "Python27"