Self-contained Python scripts with uv
blog.dusktreader.dev
Self-contained Python scripts with uv
1–10 of 114 posts
Re: Self-contained Python scripts with uv
#2Re: Self-contained Python scripts with uv
#3Re: Self-contained Python scripts with uv
#4Has anyone gotten this to work on Windows? I wanted to use this trick for some tooling for a game mod I'm working on but couldn't get the shebang trick to work.
Re: Self-contained Python scripts with uv
#5Re: Self-contained Python scripts with uv
#6Has anyone gotten this to work on Windows? I wanted to use this trick for some tooling for a game mod I'm working on but couldn't get the shebang trick to work.
Re: Self-contained Python scripts with uv
#7Has anyone gotten this to work on Windows? I wanted to use this trick for some tooling for a game mod I'm working on but couldn't get the shebang trick to work.
I haven't done dev on windows in many years, but IIRC windows doesn't have shebang support.
You could do this during an installation step, for example.
[1]: https://learn.microsoft.com/en-us/windows/win32/shell/fa-fil...
Re: Self-contained Python scripts with uv
#8Re: Self-contained Python scripts with uv
#9Has anyone gotten this to work on Windows? I wanted to use this trick for some tooling for a game mod I'm working on but couldn't get the shebang trick to work.
$> uv init --script .py
$> uv add --script .py ...
$> uv add --script .py --dev ...
$> uv run .py
Hope this helps :)
Re: Self-contained Python scripts with uv
#10This looks quite useful! Is uv a safer choice to use for deploying a python based project long term? I’m referring to the anaconda rug pull that happened- using it for managing dependencies about 5 years ago, but then they changed some rules so that any of my clients who are organizations with over 200 employees are no longer free to use anaconda. They must pay a commercial license
I peeked in uv's contributing guide and issues and didn't see any CLA. In PyTorch the CLA was mentioned at the top of the contributing guide.
Although, there should have been a community fork of the last FOSS version of Anaconda. That's what happened with Redis, and Redis uses a CLA: https://github.com/redis/redis/blob/unstable/CONTRIBUTING.md...
Don't ever sign a CLA, kids. Hell, only contribute to copyleft projects. We get paid too much to work for free.