It would be nice to have a binary file for the CLI tool available for download (in Releases section, next to the archive of the source code) for systems without python installed. I've used pyinstaller in my local fork, and it seems to work just fine for my use case, but 2 things arise:
- I think this would require another test harness; and
- I think this breaks runtime plugin support.
This might be a dealbreaker, so an alternative to bundling might be to just add instructions to the installation section of the docs. Here's what I've used:
% uv venv
% source .venv/bin/activate.fish
% uv pip install -e . pyinstaller
This creates the environment and installs dependencies. Then create cli.py with the following content:
from sqlite_utils.cli import cli
if __name__ == "__main__":
cli()
And then bundle and do a quick sanity check:
% pyinstaller --onefile --name sqlite-utils --copy-metadata sqlite-utils cli.py
% cd dist/
% ./sqlite-utils --version
% ./sqlite-utils create-table my.db people id integer name text height float --pk id --strict
Thanks for sqlite-utils :)
It would be nice to have a binary file for the CLI tool available for download (in Releases section, next to the archive of the source code) for systems without python installed. I've used pyinstaller in my local fork, and it seems to work just fine for my use case, but 2 things arise:
This might be a dealbreaker, so an alternative to bundling might be to just add instructions to the installation section of the docs. Here's what I've used:
This creates the environment and installs dependencies. Then create
cli.pywith the following content:And then bundle and do a quick sanity check:
Thanks for sqlite-utils :)