diff --git a/start.py b/start.py index 660d0c9006..768ef9d1c8 100644 --- a/start.py +++ b/start.py @@ -6,10 +6,11 @@ Bootstrapping process of OpenPype is as follows: `OPENPYPE_PATH` is checked for existence - either one from environment or from user settings. Precedence takes the one set by environment. -On this path we try to find OpenPype in directories version string in their names. -For example: `openpype-v3.0.1-foo` is valid name, or even `foo_3.0.2` - as long -as version can be determined from its name _AND_ file `openpype/openpype/version.py` -can be found inside, it is considered OpenPype installation. +On this path we try to find OpenPype in directories version string in their +names. For example: `openpype-v3.0.1-foo` is valid name, or +even `foo_3.0.2` - as long as version can be determined from its name +_AND_ file `openpype/openpype/version.py` can be found inside, it is +considered OpenPype installation. If no OpenPype repositories are found in `OPENPYPE_PATH` (user data dir) then **Igniter** (OpenPype setup tool) will launch its GUI. @@ -20,19 +21,19 @@ appdata dir in user home and extract it there. Version will be determined by version specified in OpenPype module. If OpenPype repository directories are found in default install location -(user data dir) or in `OPENPYPE_PATH`, it will get list of those dirs there and -use latest one or the one specified with optional `--use-version` command -line argument. If the one specified doesn't exist then latest available -version will be used. All repositories in that dir will be added +(user data dir) or in `OPENPYPE_PATH`, it will get list of those dirs +there and use latest one or the one specified with optional `--use-version` +command line argument. If the one specified doesn't exist then latest +available version will be used. All repositories in that dir will be added to `sys.path` and `PYTHONPATH`. -If OpenPype is live (not frozen) then current version of OpenPype module will be -used. All directories under `repos` will be added to `sys.path` and +If OpenPype is live (not frozen) then current version of OpenPype module +will be used. All directories under `repos` will be added to `sys.path` and `PYTHONPATH`. -OpenPype depends on connection to `MongoDB`_. You can specify MongoDB connection -string via `OPENPYPE_MONGO` set in environment or it can be set in user -settings or via **Igniter** GUI. +OpenPype depends on connection to `MongoDB`_. You can specify MongoDB +connection string via `OPENPYPE_MONGO` set in environment or it can be set +in user settings or via **Igniter** GUI. So, bootstrapping OpenPype looks like this:: @@ -624,6 +625,10 @@ def boot(): use_version, use_staging = _process_arguments() + if os.getenv("OPENPYPE_VERSION"): + use_staging = "staging" in os.getenv("OPENPYPE_VERSION") + use_version = os.getenv("OPENPYPE_VERSION") + # ------------------------------------------------------------------------ # Determine mongodb connection # ------------------------------------------------------------------------