mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
added get_global_environments to pype.api
This commit is contained in:
parent
58bd79bb11
commit
35327d8b24
3 changed files with 10 additions and 6 deletions
|
|
@ -19,7 +19,8 @@ from .lib import (
|
|||
get_version_from_path,
|
||||
get_last_version_from_path,
|
||||
source_hash,
|
||||
get_latest_version
|
||||
get_latest_version,
|
||||
get_global_environments
|
||||
)
|
||||
|
||||
from .lib.mongo import (
|
||||
|
|
@ -104,5 +105,6 @@ __all__ = [
|
|||
"source_hash",
|
||||
|
||||
"run_subprocess",
|
||||
"get_latest_version"
|
||||
"get_latest_version",
|
||||
"get_global_environments"
|
||||
]
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ from .config import get_datetime_data
|
|||
|
||||
from .env_tools import (
|
||||
env_value_to_bool,
|
||||
get_paths_from_environ
|
||||
get_paths_from_environ,
|
||||
get_global_environments
|
||||
)
|
||||
|
||||
from .python_module_tools import (
|
||||
|
|
@ -121,6 +122,7 @@ __all__ = [
|
|||
|
||||
"env_value_to_bool",
|
||||
"get_paths_from_environ",
|
||||
"get_global_environments",
|
||||
|
||||
"modules_from_path",
|
||||
"recursive_bases_from_class",
|
||||
|
|
|
|||
|
|
@ -80,8 +80,8 @@ def get_global_environments(env=None):
|
|||
modules.
|
||||
|
||||
Args:
|
||||
env (dict, optional): Initial environments. `os.environ` is used when
|
||||
not entered.
|
||||
env (dict, optional): Initial environments. Empty dictionary is used
|
||||
when not entered.
|
||||
|
||||
Returns;
|
||||
dict of str: Loaded and processed environments.
|
||||
|
|
@ -91,7 +91,7 @@ def get_global_environments(env=None):
|
|||
from pype.modules import ModulesManager
|
||||
|
||||
if env is None:
|
||||
env = os.environ.copy()
|
||||
env = {}
|
||||
|
||||
# Get global environments from settings
|
||||
all_settings_env = get_environments()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue