2024-05-02 19:39:31 +00:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
|
|
|
from virtualenv import cli_run
|
2024-04-29 22:47:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
def main() -> None:
|
2024-05-02 19:39:31 +00:00
|
|
|
# TODO location
|
|
|
|
if not os.access("/tmp/kiwi/bin/kiwi-core", os.X_OK):
|
|
|
|
cli_run(["/tmp/kiwi"])
|
|
|
|
subprocess.check_call(["/tmp/kiwi/bin/python3", "-m", "pip", "install", "."])
|
|
|
|
|
|
|
|
try:
|
|
|
|
subprocess.check_call(["/tmp/kiwi/bin/kiwi-core", *sys.argv[1::]])
|
|
|
|
except subprocess.CalledProcessError as exc:
|
|
|
|
sys.exit(exc.returncode)
|
2024-04-29 22:47:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|