from pathlib import Path import subprocess import sys def install(): HERE = Path(__file__).parent.absolute() path_to_main = str(HERE / "src" / "cli.py") try: subprocess.check_call([ "pyinstaller", "--onefile", "--name=install-chromedriver", path_to_main ]) print("Executable built successfully.") except subprocess.CalledProcessError: print("PyInstaller failed.") sys.exit(1) def build_all(): # Run poetry build subprocess.run(["poetry", "build"], check=True) # Run the build-executable script subprocess.run(["poetry", "run", "build-executable"], check=True)