| ▲ | Imustaskforhelp 6 hours ago | ||||||||||||||||||||||||||||||||||
> It introduces more dependencies(Python which I solved via Nix) but others haven't solved this problem and the Python script has dependencies(such as Click for the CLI). UV scripts are great for this type of workflow There are even scripts which will install uv in the same file effectively making it just equivalent to ./run-file.py and it would handle all the dependency management the python version management and everything included and would work everywhere https://paulw.tokyo/standalone-python-script-with-uv/ Personally I end up just downloading uv and so not using the uv download script from this but if I am using something like github action which are more (ephemeral?) I'd just do this. Something like this can start out simple and can scale much more than the limitations of bash which can be abundant at times That being said, I still make some shell scripts because executing other applications is first class support in bash but not so much in python but after discovering this I might create some new scripts with python with automated uv because I end up installing uv on many devices anyway (because uv's really good for python) I am interested in bun-shell as well but that feels way too much bloated and even not used by many so less (AI assistance at times?) and I haven't understood bun shell at the same time too and so bash is superior to it usually | |||||||||||||||||||||||||||||||||||
| ▲ | Storment33 6 hours ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
> UV scripts are great for this type of workflow So previously when I have seen Python used as a task runner I think they used UV to call it. Although I don't think they had as a complete solution as your here auto-installing UV etc. Although the example you've linked is installing UV if missing, the version is not pinned, I also don't think it is handling missing Python which is not pinned even if installed locally. So you could get different versions on CI vs locally. While yes you are removing some of the dependencies problems created via using Python over Make/Shell I don't think this completely solves it. > Something like this can start out simple and can scale much more than the limitations of bash which can be abundant at times I personally haven't witnessed anytime I would consider the scales to have tipped in favour of Python and I would be concerned if they ever do, as really the task runner etc should be plumbing, so it should be simple. > That being said, I still make some shell scripts because executing other applications is first class support in bash but not so much in python but after discovering this I might create some new scripts with python with automated uv because I end up installing uv on many devices anyway (because uv's really good for python) Using Python/UV to do anything more complex than my example PR above? | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | quotemstr 6 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
This thing does a global uv install when run? That's obnoxious! Never running stuff from whoever wrote this. Oh, and later the author suggests the script modify itself after running. What the fuck. Absolutely unacceptable way to deploy software. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||