1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-22 23:51:03 +00:00
AdvLabDB/advlabdb/scripts/setup/shared.py

18 lines
463 B
Python
Raw Normal View History

2022-05-08 15:29:45 +00:00
from pathlib import Path
2022-05-08 19:26:25 +00:00
from ... import __file__ as advlabdb_init_path # Points to __init__.py
from ..terminal_utils import run
2022-05-08 15:29:45 +00:00
LOCAL_BIN = Path("/home/admin/.local/bin/")
LOGS_DIR = Path("/var/log/advlabdb")
def install_latest_pipx():
run("pip install --user --upgrade pipx")
def poetry_update():
poetry_bin = LOCAL_BIN / "poetry"
advlabdb_root_dir = Path(advlabdb_init_path).parents[1]
run(f"{poetry_bin} update", cwd=advlabdb_root_dir)