1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-11-12 21:40:41 +00:00
AdvLabDB/advlabdb/scripts/setup/shared.py
2022-07-03 18:26:15 +02:00

22 lines
547 B
Python

"""
No relative imports allowed in this file to be able to run server_setup.py without packages.
"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent.absolute()))
from terminal_utils import run
LOCAL_BIN = Path("/home/admin/.local/bin/")
LOGS_DIR = Path("/var/log/advlabdb")
REPO_DIR = Path("/home/admin/advlabdb")
def install_latest_pipx():
run("pip install --user --upgrade pipx")
def poetry_update():
poetry_bin = LOCAL_BIN / "poetry"
run(f"{poetry_bin} update --no-dev", cwd=REPO_DIR)