Skip to content

Commit

Permalink
pyproject.toml: Add uv as an "extra" dependency for FawltyDeps
Browse files Browse the repository at this point in the history
This allows users to install (or depend on) `"fawltydeps[uv]"` which
will then automatically bring in `uv` alongside `fawltydeps`.

This has no effect on our test/developer environments, as we install
`fawltydeps` without extras, but we still get `uv` via our dependency
on `nox[uv]`.

We should consider updating the FawltyDeps GitHub Action to install
`fawltydeps[uv]`, so that we can benefit from `uv` in that scenario as
well.
  • Loading branch information
jherland committed Jun 12, 2024
1 parent 591ea1b commit 1bbf032
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ section of your `pyproject.toml`.

FawltyDeps will use [`uv`](https://github.com/astral-sh/uv) by default to
temporarily install missing dependencies. If `uv` not available, `pip` will be
used instead.
used instead. If you want to ensure that the faster `uv` is avaiable, you can
install `fawltydeps` with the `uv` extra (e.g. `pip install fawltydeps[uv]`).

To further customize how this automatic installation is done (e.g. if you need
to use a different package index), you can use environment variables to alter
Expand Down
42 changes: 23 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ setuptools = [
{version = ">=68.0.0,<68.1.0", python = "<3.8"},
]

# Optional dependencies, covered by .extras below:
uv = {version = ">=0.1.6", python = ">=3.8", optional = true}

[tool.poetry.extras]
uv = ["uv"]

[tool.poetry.group.nox]
optional = true

Expand Down

0 comments on commit 1bbf032

Please sign in to comment.