-
-
Notifications
You must be signed in to change notification settings - Fork 469
Expand file tree
/
Copy pathsync.py
More file actions
23 lines (18 loc) · 595 Bytes
/
sync.py
File metadata and controls
23 lines (18 loc) · 595 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from devenv import constants
from devenv.lib import config, proc, uv
import os
def main(context: dict[str, str]) -> int:
reporoot = context["reporoot"]
cfg = config.get_repo(reporoot)
uv.install(
cfg["uv"]["version"],
cfg["uv"][constants.SYSTEM_MACHINE],
cfg["uv"][f"{constants.SYSTEM_MACHINE}_sha256"],
reporoot,
)
# reporoot/.venv is the default venv location
print(f"syncing .venv ...")
if not os.path.exists(".venv"):
proc.run(("uv", "venv", "--seed"))
proc.run(("uv", "sync", "--frozen", "--quiet"))
return 0