Add standalone installers to Ruff installation in README (#12163)

Note this is already included in our installation page at
`docs/installation.md`

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
This commit is contained in:
Zanie Blue 2024-07-03 14:39:58 -04:00 committed by GitHub
parent 24524771f2
commit c487b99e93
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,10 +116,28 @@ For more, see the [documentation](https://docs.astral.sh/ruff/).
### Installation
Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI:
Install Ruff with our standalone installers:
```shell
# On macOS and Linux.
curl -LsSf https://astral.sh/ruff/install.sh | sh
# On Windows.
powershell -c "irm https://astral.sh/ruff/install.ps1 | iex"
# For a specific version.
curl -LsSf https://astral.sh/ruff/0.5.0/install.sh | sh
powershell -c "irm https://astral.sh/ruff/0.5.0/install.ps1 | iex"
```
Or, from [PyPI](https://pypi.org/project/ruff/):
```shell
# With pip.
pip install ruff
# With pipx.
pipx install ruff
```
You can also install Ruff via [Homebrew](https://formulae.brew.sh/formula/ruff), [Conda](https://anaconda.org/conda-forge/ruff),