if executable != RT_PY: code = check_call((RT_PY, "-m", "python", "deps", "packages"), cwd=TOP_LEVEL) exit(code) else: from .components.install import install code = arun(install()) if code: exit(code) elif command == "run": assert executable == RT_PY from pynvim import attach from pynvim_pp.client import run_client from std2.pickle import DecodeError try: from .client import Client except DecodeError as e: print(e, file=stderr) exit(1) else: nvim = attach("socket", path=args.socket) code = run_client(nvim, client=Client()) exit(code) else: assert False
else: import pynvim import pynvim_pp import std2 import yaml except ImportError as e: msg = f""" Please update dependencies using :COQdeps - - Dependencies will be installed privately inside `{VARS}` `{join(("rm", "-rf", str(TOP_LEVEL.name)))}` will cleanly remove everything """ msg = dedent(msg) print(e, msg, sep=linesep, end="", file=stderr) exit(1) else: from pynvim import attach from pynvim_pp.client import run_client from .client import CoqClient nvim = attach("socket", path=args.socket) with ThreadPoolExecutor(max_workers=min(64, max(32, cpu_count() + 10))) as pool: code = run_client(nvim, pool=pool, client=CoqClient(pool=pool)) exit(code) else: assert False