postkitty-api / engine_requirements.py
mertkayacs's picture
deploy with engine 3543e5d791141aef59b0299af90798f054f71148
f551342 verified
Raw History Blame Contribute Delete
379 Bytes
"""Print the Python packages an engine checkout asks for, one per line, from its pyproject.toml.
python engine_requirements.py /path/to/postkitty > engine-requirements.txt
"""
import sys
import tomllib
from pathlib import Path
project = tomllib.loads((Path(sys.argv[1]) / "pyproject.toml").read_text(encoding="utf-8"))["project"]
print("\n".join(project["dependencies"]))