mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
removed set_environments function as it is
This commit is contained in:
parent
68be90e31d
commit
19c6181968
1 changed files with 1 additions and 37 deletions
38
start.py
38
start.py
|
|
@ -112,46 +112,13 @@ if getattr(sys, 'frozen', False):
|
||||||
os.environ["PYTHONPATH"] = os.pathsep.join(paths)
|
os.environ["PYTHONPATH"] = os.pathsep.join(paths)
|
||||||
|
|
||||||
from igniter import BootstrapRepos # noqa: E402
|
from igniter import BootstrapRepos # noqa: E402
|
||||||
from igniter.tools import load_environments, get_pype_path_from_db # noqa
|
from igniter.tools import get_pype_path_from_db # noqa
|
||||||
from igniter.bootstrap_repos import PypeVersion # noqa: E402
|
from igniter.bootstrap_repos import PypeVersion # noqa: E402
|
||||||
|
|
||||||
bootstrap = BootstrapRepos()
|
bootstrap = BootstrapRepos()
|
||||||
silent_commands = ["run", "igniter", "standalonepublisher"]
|
silent_commands = ["run", "igniter", "standalonepublisher"]
|
||||||
|
|
||||||
|
|
||||||
def set_environments() -> None:
|
|
||||||
"""Set loaded environments.
|
|
||||||
|
|
||||||
.. todo:
|
|
||||||
better handling of environments
|
|
||||||
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
import acre
|
|
||||||
except ImportError:
|
|
||||||
if getattr(sys, 'frozen', False):
|
|
||||||
sys.path.append(os.path.join(
|
|
||||||
os.path.dirname(sys.executable),
|
|
||||||
"dependencies"
|
|
||||||
))
|
|
||||||
try:
|
|
||||||
import acre
|
|
||||||
except ImportError as e:
|
|
||||||
# giving up
|
|
||||||
print("!!! cannot import acre")
|
|
||||||
print(f"{e}")
|
|
||||||
sys.exit(1)
|
|
||||||
try:
|
|
||||||
env = load_environments(["global"])
|
|
||||||
except OSError as e:
|
|
||||||
print(f"!!! {e}")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# acre must be available here
|
|
||||||
env = acre.merge(env, dict(os.environ)) # noqa
|
|
||||||
os.environ.clear()
|
|
||||||
os.environ.update(env)
|
|
||||||
|
|
||||||
|
|
||||||
def run(arguments: list, env: dict = None) -> int:
|
def run(arguments: list, env: dict = None) -> int:
|
||||||
"""Use correct executable to run stuff.
|
"""Use correct executable to run stuff.
|
||||||
|
|
@ -573,9 +540,6 @@ def boot():
|
||||||
else:
|
else:
|
||||||
os.environ["PYPE_ROOT"] = os.path.dirname(__file__)
|
os.environ["PYPE_ROOT"] = os.path.dirname(__file__)
|
||||||
|
|
||||||
# No environment loading from settings until Pype version is established.
|
|
||||||
# set_environments()
|
|
||||||
|
|
||||||
# Get Pype path from database and set it to environment so Pype can
|
# Get Pype path from database and set it to environment so Pype can
|
||||||
# find its versions there and bootstrap them.
|
# find its versions there and bootstrap them.
|
||||||
pype_path = get_pype_path_from_db(pype_mongo)
|
pype_path = get_pype_path_from_db(pype_mongo)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue