3 ms·
I'm a fan of using just as a command-runner as well, but took a slightly different approach to making it pip-installable! I created the `pyjust` package (https
by justinyan 3y ago
I'm a fan of using just as a command-runner as well, but took a slightly different approach to making it pip-installable! I created the `pyjust` package (https://pypi.org/project/pyjust/ https://pypi.org/project/pyjust/), which literally just packages the `just` binary in platform-specific wheels, and then unpacks it onto the PATH by leveraging the `scripts` directory unpacking.
Why do this you might ask? My rationale here was that I use `pipx` to install some python CLIs, and it was nice to be able to lump `just` in with that, as well as to be able to declare it as a "dependency" and pin specific versions for distribution.
- 0cf8612b2e1e 3y agoI love this! I use pipx all the time, and this is perfect workaround on a computer that either does not have Rust and/or requires me to manually download from the repository. Great idea, and I am wondering if there are more utilities I could/should wrap in a similar fashion. A cross platform brew.
- justinyan 3y agosimonw got me interested in the idea after I ran into one of his blogposts talking about how ziglang does it, and then studying ruff + maturin helped me reverse engineer how to accomplish this without any python intermediary in a "python package". I put together a cruft template (https://github.com/justin-yan/templates-cruft/tree/main/packages-public/pybin https://github.com/justin-yan/templates-cruft/tree/main/pack...) since I had the exact same thought as you once I got it working - why not do this with a bunch of different tools? I did it with a couple of my favorites (just, lazydocker) but haven't gone back to clean things up/make things a bit more systematic. So it's a pretty messy weekend project (caveat emptor) but hopefully it's a helpful starting point if you want to try it!
- snthpy 3y agoI also love this. I might try and adopt this for some utilities as well.