-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] Installation via pip? #2311
Comments
Interesting idea! I think it depends on how weird and complicated the wrapper and CI task are. If they're really simple, then I guess why not. My main worry wouldn't be the package itself, but instead keeping the package up to date. I've personally been horrific at keeping |
Ok, I think it's as simple as adding the following to a
Here's what I did (I'm on WSL so I have to specify --target):
At the end of the day a .whl file is just a zip file with the scripts/just binary and some random metadata (license, abi tag, how it was built, etc), and maturin handles that for us. maturin also generates a Github Actions yaml if you ask for it ( |
The version number in Won't the python package be architecture specific? I.e., it'll contain an x86 binary, and will not run on a non-x86 machine? Would a better approach instead be to create a python package which never changes, which downloads an appropriate binary similar to https://github.com/casey/just/blob/master/www/install.sh? |
Re: automatically generating the .toml: definitely possible, in that you can make a script to generate a pyproject.toml, but it turns out that maturin will take metadata fields by default from Cargo.toml, so you can just omit the lines you don't want to override (i.e. version, description, etc.). Re: architecture-specific: it will, but in practice wheels are tagged by their specific variant (i.e. I think it comes down to whether you think using the Github actions build time is worth it to precompile for (any) platforms. Personally I think for maintenance burden it would be better to have "no wheels, compile it yourself" over "customized script that downloads the right binary". For example, you'd need to make sure "pip uninstall just" also works, etc., which is much simpler with just the default maturin setup. |
Got it, thanks for the explanation! That all sounds good, want to submit a PR? |
Done, thanks for the consideration. |
See comments in #2361, but I'm leaning towards not adding this. I fear it will get out of date or the build will break, and I'm honestly pretty unlikely to test it, so I would suggest maintaining this out-of-tree, and I can link to it in the readme. For the package name, I would suggest |
This is a bit of an odd request, but I work in some environments where installing external dependences is difficult (e.g. it would complicate the dev setup process) except that installation of Python packages is considered acceptable.
Would you consider a PR that (a) creates a Python package that just bundles
just
(via maturin) as a CLI script, and (b) a Github actions workflow that cuts a new PyPI release wheneverjust
is updated?That way, you can install
just
viapip install just
(though in practice we might have to choose a different name,
just
is unfortunately taken on PyPI)No worries if out of scope - I would just maintain my own such wrapper if that's the case but I thought it would appropriate to ask.
The text was updated successfully, but these errors were encountered: