4 ms·
It can. That's what uv is. Put an '#!/usr/bin/env -S uv run python' shebang in your script, add a `pyproject.toml` with all of your deps, and you're done.
by kouteiheika 1y ago
It can. That's what uv is. Put an '#!/usr/bin/env -S uv run python' shebang in your script, add a `pyproject.toml` with all of your deps, and you're done.
- dwattttt 1y ago> add a `pyproject.toml` with all of your deps Or put your dependencies inline in the script (https://packaging.python.org/en/latest/specifications/inline-script-metadata/ https://packaging.python.org/en/latest/specifications/inline...), and it's just a single file script again. But with dependency support EDIT to clarify it was just the pyproject.toml that inline metadata could replace
- russellbeattie 1y agoAgain, you're creating a new session with special environmental variables. It's nice that it uses pyproject.toml (well, except for the toml part), but it still needs uv. I was suggesting that the Python executable have this sort of functionality built in, with no need for a new session.