diff --git a/README.md b/README.md index 6bdfb942..6f25bad3 100644 --- a/README.md +++ b/README.md @@ -25,31 +25,30 @@ [crates]: https://crates.io/crates/rattler_installs_packages [crates-badge]: https://img.shields.io/crates/v/rattler_installs_packages.svg +# Introduction `RIP` is a library that allows the resolving and installing of Python [PyPI](https://pypi.org/) packages from Rust into a virtual environment. It's based on our experience with building [Rattler](https://github.com/mamba-org/rattler) and aims to provide the same experience but for PyPI instead of Conda. -It should be fast and easy to use. Like Rattler, this library is not a package manager itself but provides the low-level plumbing to be used in one. + +## What should I use this for? + +Like Rattler, `RIP` should be fast and easy to use. This library is not a package manager itself but provides the low-level plumbing to be used in one. +To see an example of this take a look at our package manager: [pixi](https://github.com/prefix-dev/pixi) `RIP` is based on the quite excellent work of [posy](https://github.com/njsmith/posy) and we have tried to credit the authors where possible. # Showcase -Let's resolve the `flask` python package. -We've added a small binary in `rip_bin` to showcase this: - -![flask-install](https://github.com/prefix-dev/rip/assets/4995967/5b0356b6-8e06-47bb-9424-94b3fdd9da09) +`RIP` has a very incomplete pip-like binary that can be used to test package installs. +Let's resolve and install the `flask` python package. Running `cargo r install flask /tmp/flask` we get something like this: -This showcases the downloading and caching of metadata from PyPI. As well as the package resolution using our solver, more on this below. -We cache everything in a local directory so that we can re-use the metadata and don't have to download it again. +![rip-install](https://github.com/prefix-dev/rip/assets/417374/1d55754f-de3a-474f-8ee8-06f7dd098eea) -# Installation - -We have added very simple installation support for the resolved packages. -For testing purposes exclusively, we have added an `install` command to the `rip_bin` binary. -E.g. `cargo r -- install flask /tmp/flask` to create a venv and install the flask and it's into it. -There is no detection of existing packages yet. +This showcases the downloading and caching of metadata from PyPI. As well as the package resolution using our incremental SAT solver: [Resolvo](https://github.com/mamba-org/resolvo), more on this below. +Finally, after resolution it installs the package into a venv. +We cache everything locally so that we can re-use the PyPi metadata. ## Features @@ -63,15 +62,26 @@ This is a list of current features of `RIP`, the biggest are listed below: More intricacies of the PyPI ecosystem need to be implemented, see our GitHub issues for more details. +# Details -# Solver +## Resolving We have integrated the stand-alone packaging SAT solver [Resolvo](https://github.com/mamba-org/resolvo), to resolve pypi packages. This solver is incremental and adds packaging metadata during resolution of the SAT problem. This feature can be enabled with the `resolvo` feature flag. +## Installation + +We have very simple installation support for the resolved packages. +This should be used for testing purposes exclusively +E.g. `cargo r -- install flask /tmp/flask_env` to create a venv and install the flask and it's into it. +After which you can run: + 1. `/tmp/flask_env/bin/python` to start python in the venv. + 2. `import flask #`, this should import the flask package from the venv. +There is no detection of existing packages in the venv yet, although this should be relatively straightforward. + -## Contributing 😍 +# Contributing 😍 We would love to have you contribute! See the [CONTRIBUTING.md](./CONTRIBUTING.md) for more info. For questions, requests or a casual chat, we are very active on our discord server.