diff --git a/.python-version b/.python-version new file mode 100644 index 0000000000..371cfe355d --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.11.1 diff --git a/README.md b/README.md index cf0115c3bb..0bb20f0b39 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,12 @@ an exploration, and it's far from perfect. Thus also the question:
Click on the thumbnail to watch a 9 minute introduction video
+Learn more: + +* [Documentation](https://mitsuhiko.github.io/rye) +* [Issue Tracker](https://github.com/mitsuhiko/issues) +* [Discussions](https://github.com/mitsuhiko/discussions) + ## Installation Rye is built in Rust. There is no binary distribution yet, it only works on Linux @@ -56,11 +62,6 @@ pick up the right Python without manually activating the virtualenv, you can add of a rye managed project, the regular Python is picked up automatically. For the global tool installation you need to add the shims to the path. -## Deinstallation - -If you no longer want anything to do with rye, all you need to delete is the `~/.rye` -folder. Everything that it has downloaded / created is placed in there. - ## Some of the things it does It automatically installs and manages Python: @@ -123,91 +124,6 @@ To understand why things are the way they are: shims to your shell and you can run `python` and it will automatically always operate in the right project. -## What Could Be? - -There are a few shortcomings in the Python packaging world, largely as a result of -lack of standardization. Here is what this project ran into over the years: - -- **No Python Binary Distributions:** CPython builds from python.org are completely - inadequate. On some platforms you only get an .msi installer, on some you - literally only get tarballs. The various Python distributions that became popular - over the years are diverging greatly and cause all kinds of nonsense downstream. - This is why this Project uses the indygreg standalone builds. I hope that with - time someone will start distributing well maintained and reliable Python builds - to replace the mess we are dealing with today. - -- **No Dev Dependencies:** Rye currently needs a custom section in the `pyproject.toml` - to represent dev dependencies. There is no standard in the ecosystem for this. It - really should be added. - -- **No Local Dependency Overlays:** There is no standard for how to represent local - dependencies. Rust for this purpose has something like `{ path = "../foo" }` - which allows both remote and local references to co-exist and it rewrites them - on publish. - -- **No Exposed Pip:** pip is intentionally not exposed. If you were to install something - into the virtualenv, it disappears next time you sync. If you symlink `rye` to - `~/.rye/shims/pip` you can get access to pip without installing it into the - virtualenv. There be dragons. - -- **No Workspace Spec:** for monorepos and things of that nature, the Python ecosystem - would need a definition of workspaces. Today that does not exist which forces every - tool to come up with it's own solutions to this problem. - -- **No Basic Script Section:** There should be a standard in `pyproject.toml` to - represent scripts like `rye` does in `rye.tools.scripts`. - -## Adding Dependencies - -To add a new dependency run `rye add` with the name of the package that you want to -install. Additionally a proprietary extension to `pyproject.toml` exists to add -development only packages. For those add `--dev`. - -```shell -$ rye add "flask>=2.0" -$ rye add --dev black -``` - -Adding dependencies will not directly install them. To install them run `rye sync` again. - -## Workspaces - -To have multiple projects share the same virtualenv, it's possible to declare workspaces -in the `pyproject.toml`: - -```toml -[tool.rye.workspace] -members = ["foo-*"] -``` - -When `rye sync` is run in a workspace, then all packages are installed at all times. This -also means that they can inter-depend as they will all be installed editable by default. - -## Lockfiles - -Rye does not try to re-invent the world (yet!). This means it uses `pip-tools` behind -the scenes automatically. As neither `pip` nor `pip-tools` provide lockfiles today -Rye uses generated `requirements.txt` files as replacement. Whenever you run -`rye sync` it updates the `requirements.lock` and `requirements-dev.lock` files -automatically. - -## Scripts - -`rye run` can be used to invoke a binary from the virtualenv or a configured script. -Rye allows you to define basic scripts in the `pyproject.toml` in the `tool.rye.scripts` -section: - -```toml -[tool.rye.scripts] -serve = "python -m http.server 8000" -``` - -They are only available via `rye run