From 182502c5e4d24f9cac272e380c537cb3fa7b3740 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 9 Apr 2020 12:44:24 +0200 Subject: [PATCH] replaced "PYPE_ROOT" with "PYPE_SETUP_PATH" --- docs/source/conf.py | 2 +- make_docs.bat | 8 ++++---- pype/clockify/widget_settings.py | 2 +- pype/ftrack/tray/login_dialog.py | 2 +- pype/lib.py | 4 ++-- pype/muster/widget_login.py | 2 +- pype/plugins/global/publish/submit_publish_job.py | 2 +- pype/plugins/maya/publish/submit_maya_muster.py | 2 +- pype/scripts/publish_deadline.py | 4 ++-- pype/scripts/publish_filesequence.py | 6 +++--- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 894425e56b..d022332a56 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,7 @@ from pypeapp.pypeLauncher import PypeLauncher from pypeapp.storage import Storage from pypeapp.deployment import Deployment -pype_setup = os.getenv('PYPE_ROOT') +pype_setup = os.getenv('PYPE_SETUP_PATH') d = Deployment(pype_setup) launcher = PypeLauncher() diff --git a/make_docs.bat b/make_docs.bat index f0011086e5..d2ea75562f 100644 --- a/make_docs.bat +++ b/make_docs.bat @@ -25,15 +25,15 @@ set PYTHONPATH=%%d;!PYTHONPATH! echo ^>^>^> Setting PYPE_CONFIG call :ResolvePath pypeconfig "..\pype-config" set PYPE_CONFIG=%pypeconfig% -echo ^>^>^> Setting PYPE_ROOT +echo ^>^>^> Setting PYPE_SETUP_PATH call :ResolvePath pyperoot "..\..\" -set PYPE_ROOT=%pyperoot% -set PYTHONPATH=%PYPE_ROOT%;%PYTHONPATH% +set PYPE_SETUP_PATH=%pyperoot% +set PYTHONPATH=%PYPE_SETUP_PATH%;%PYTHONPATH% echo ^>^>^> Setting PYPE_ENV set PYPE_ENV="C:\Users\Public\pype_env2" call "docs\make.bat" clean -sphinx-apidoc -M -f -d 6 --ext-autodoc --ext-intersphinx --ext-viewcode -o docs\source pype %PYPE_ROOT%\repos\pype\pype\vendor\* +sphinx-apidoc -M -f -d 6 --ext-autodoc --ext-intersphinx --ext-viewcode -o docs\source pype %PYPE_SETUP_PATH%\repos\pype\pype\vendor\* call "docs\make.bat" html echo ^>^>^> Doing cleanup ... set PYTHONPATH=%_OLD_PYTHONPATH% diff --git a/pype/clockify/widget_settings.py b/pype/clockify/widget_settings.py index 7142548fa6..027268834c 100644 --- a/pype/clockify/widget_settings.py +++ b/pype/clockify/widget_settings.py @@ -26,7 +26,7 @@ class ClockifySettings(QtWidgets.QWidget): elif hasattr(parent, 'parent') and hasattr(parent.parent, 'icon'): self.setWindowIcon(self.parent.parent.icon) else: - pype_setup = os.getenv('PYPE_ROOT') + pype_setup = os.getenv('PYPE_SETUP_PATH') items = [pype_setup, "app", "resources", "icon.png"] fname = os.path.sep.join(items) icon = QtGui.QIcon(fname) diff --git a/pype/ftrack/tray/login_dialog.py b/pype/ftrack/tray/login_dialog.py index 5f3777f93e..88c4e90374 100644 --- a/pype/ftrack/tray/login_dialog.py +++ b/pype/ftrack/tray/login_dialog.py @@ -29,7 +29,7 @@ class Login_Dialog_ui(QtWidgets.QWidget): elif hasattr(parent, 'parent') and hasattr(parent.parent, 'icon'): self.setWindowIcon(self.parent.parent.icon) else: - pype_setup = os.getenv('PYPE_ROOT') + pype_setup = os.getenv('PYPE_SETUP_PATH') items = [pype_setup, "app", "resources", "icon.png"] fname = os.path.sep.join(items) icon = QtGui.QIcon(fname) diff --git a/pype/lib.py b/pype/lib.py index 824d2e0f52..ab99e6a49c 100644 --- a/pype/lib.py +++ b/pype/lib.py @@ -660,7 +660,7 @@ def execute_hook(hook, *args, **kwargs): This will load hook file, instantiate class and call `execute` method on it. Hook must be in a form: - `$PYPE_ROOT/repos/pype/path/to/hook.py/HookClass` + `$PYPE_SETUP_PATH/repos/pype/path/to/hook.py/HookClass` This will load `hook.py`, instantiate HookClass and then execute_hook `execute(*args, **kwargs)` @@ -671,7 +671,7 @@ def execute_hook(hook, *args, **kwargs): class_name = hook.split("/")[-1] - abspath = os.path.join(os.getenv('PYPE_ROOT'), + abspath = os.path.join(os.getenv('PYPE_SETUP_PATH'), 'repos', 'pype', *hook.split("/")[:-1]) mod_name, mod_ext = os.path.splitext(os.path.basename(abspath)) diff --git a/pype/muster/widget_login.py b/pype/muster/widget_login.py index 1d0dd29d59..88d769ef93 100644 --- a/pype/muster/widget_login.py +++ b/pype/muster/widget_login.py @@ -23,7 +23,7 @@ class MusterLogin(QtWidgets.QWidget): elif hasattr(parent, 'parent') and hasattr(parent.parent, 'icon'): self.setWindowIcon(parent.parent.icon) else: - pype_setup = os.getenv('PYPE_ROOT') + pype_setup = os.getenv('PYPE_SETUP_PATH') items = [pype_setup, "app", "resources", "icon.png"] fname = os.path.sep.join(items) icon = QtGui.QIcon(fname) diff --git a/pype/plugins/global/publish/submit_publish_job.py b/pype/plugins/global/publish/submit_publish_job.py index 3d991142c7..f8b2c80fa3 100644 --- a/pype/plugins/global/publish/submit_publish_job.py +++ b/pype/plugins/global/publish/submit_publish_job.py @@ -151,7 +151,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): "FTRACK_API_USER", "FTRACK_API_KEY", "FTRACK_SERVER", - "PYPE_ROOT", + "PYPE_SETUP_PATH", "PYPE_METADATA_FILE", "AVALON_PROJECT" ] diff --git a/pype/plugins/maya/publish/submit_maya_muster.py b/pype/plugins/maya/publish/submit_maya_muster.py index af968ed773..fdd246d012 100644 --- a/pype/plugins/maya/publish/submit_maya_muster.py +++ b/pype/plugins/maya/publish/submit_maya_muster.py @@ -312,7 +312,7 @@ class MayaSubmitMuster(pyblish.api.InstancePlugin): # replace path for UNC / network share paths, co PYPE is found # over network. It assumes PYPE is located somewhere in # PYPE_CORE_PATH - pype_root = os.environ["PYPE_ROOT"].replace( + pype_root = os.environ["PYPE_SETUP_PATH"].replace( os.path.normpath(os.environ['PYPE_CORE_MOUNT']), os.path.normpath(os.environ['PYPE_CORE_PATH']) ) diff --git a/pype/scripts/publish_deadline.py b/pype/scripts/publish_deadline.py index e6052dbfd2..16d097a1ea 100644 --- a/pype/scripts/publish_deadline.py +++ b/pype/scripts/publish_deadline.py @@ -14,9 +14,9 @@ def __main__(): "configuration.") kwargs, args = parser.parse_known_args() - pype_root = os.environ.get("PYPE_ROOT") + pype_root = os.environ.get("PYPE_SETUP_PATH") if not pype_root: - raise Exception("PYPE_ROOT is not set") + raise Exception("PYPE_SETUP_PATH is not set") # TODO: set correct path pype_command = "pype.ps1" diff --git a/pype/scripts/publish_filesequence.py b/pype/scripts/publish_filesequence.py index 0a08e9ed4c..8b99d0560f 100644 --- a/pype/scripts/publish_filesequence.py +++ b/pype/scripts/publish_filesequence.py @@ -47,10 +47,10 @@ def __main__(): auto_pype_root = os.path.dirname(os.path.abspath(__file__)) auto_pype_root = os.path.abspath(auto_pype_root + "../../../../..") - auto_pype_root = os.environ.get('PYPE_ROOT') or auto_pype_root - if os.environ.get('PYPE_ROOT'): + auto_pype_root = os.environ.get('PYPE_SETUP_PATH') or auto_pype_root + if os.environ.get('PYPE_SETUP_PATH'): print("Got Pype location from environment: {}".format( - os.environ.get('PYPE_ROOT'))) + os.environ.get('PYPE_SETUP_PATH'))) pype_command = "pype.ps1" if platform.system().lower() == "linux":