set specific version from env OPENPYPE_VERSION if present.

This commit is contained in:
Ondřej Samohel 2021-05-25 12:54:38 +02:00
parent 7498650cf2
commit e2ca35b881
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -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
# ------------------------------------------------------------------------