Enable installation via cargo
We can't upload to crates.io because we're using an unreleased version of RustPython.
I've asked about publishing Ruff's RustPython fork here: https://github.com/RustPython/RustPython/issues/4179
Regardless we are ready or not, I want to distribute rustpython-parser before ruff 0.1. Please poke me when you are ready for 0.1. I seriously don't want to block ruff's schedule by our fault.
@youknowone - Thank you, that's really helpful and appreciated.
There are a few PRs I'd need to merge to move off of my RustPython fork (which is largely ahead of main) -- I know you know about some of these, but I'll just enumerate them here for completeness:
- https://github.com/RustPython/RustPython/pull/4192
- https://github.com/RustPython/RustPython/pull/4143
- (Not totally essential) https://github.com/charliermarsh/RustPython/pull/3
- https://github.com/RustPython/RustPython/pull/4218
RustPython just cut a new release on crates.io. So the only blocker here is (1) confirming that we want to use the Crate, which might mean we're a little slower to pick up changes from Git; and (2) LibCST is still using my unpublished fork (which just removes pyo3 stuff).
Hey! I was looking at adding documentation for installation from crates.io then realized it wasn't supported :D
-
Is it feasible to use RustPython from Git for other releases and only publish to
crates.ioif the published RustPython version has the sufficient changes? Is that worth the trouble? -
Is this resolved now?
I think there are three blockers here that we'd need to resolve, since, in order to publish to crates.io, we can't have any Git dependencies in the dependency tree:
- Publish our parser fork as their own crates (https://github.com/astral-sh/RustPython-Parser), e.g.,
ruff_rustpython_parseror similar. - In RustPython (and our fork), remove the Git dependency on unicode_names2.
- Publish our LibCST fork as its own crate (https://github.com/charliermarsh/LibCST/tree/charlie/ruff).
Related https://github.com/RustPython/Parser/issues/67
I'd like to grant publish permission of parser to anyone from Ruff who need it. I didn't finish unicode_names2 patch to merge it yet. I need to port the implementation to its own phf.
I think all mentioned blockers are gone, Are there any new?
Yes now that we've resolved the blockers we are considering publishing to crates.io but have not come to a decision yet.
Has there been any update on this (or would cargo install --git https://github.com/astral-sh/ruff ruff work: seems to install but I'm not sure if there's tests I can run to confirm: does seem to be working on code I have)
@KGrewal1 -- cargo install --git https://github.com/astral-sh/ruff ruff should work just fine! I tested it myself too.