From 1bbf032acfa7a902fb076a27edd94592e0ca41e7 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Wed, 12 Jun 2024 10:55:52 +0200 Subject: [PATCH] pyproject.toml: Add `uv` as an "extra" dependency for FawltyDeps 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. --- README.md | 3 ++- poetry.lock | 42 +++++++++++++++++++++++------------------- pyproject.toml | 6 ++++++ 3 files changed, 31 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b817ac2f..81963003 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/poetry.lock b/poetry.lock index 6cc08387..cb381ed2 100644 --- a/poetry.lock +++ b/poetry.lock @@ -734,28 +734,29 @@ files = [ [[package]] name = "uv" -version = "0.1.32" +version = "0.2.11" description = "An extremely fast Python package installer and resolver, written in Rust." optional = false python-versions = ">=3.8" files = [ - {file = "uv-0.1.32-py3-none-linux_armv6l.whl", hash = "sha256:ac453ebbc52da083501a56e0378a71be637920c4cbf60b6dca64292464a00c23"}, - {file = "uv-0.1.32-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:f61de511a3296aa9519ac9cc1d30987aea00a94cd964c8227088a14f0b3f3ab3"}, - {file = "uv-0.1.32-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:11f1df69d5adad54871e12ed7d7c9250deda9da4800b3dadfa84a65625e945f5"}, - {file = "uv-0.1.32-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0c9ca49cc73bf61eaf88d005bc16193a2f211a736f26c7612fa158a9a44c4efc"}, - {file = "uv-0.1.32-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:907ff64b74da60e2280b4536f7ae64539219254286c81b857f709ab2e91487ff"}, - {file = "uv-0.1.32-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:faf8bba1feb328b93376c2ff26a436a4a41ac45e12c3e46a850edb289e7653fd"}, - {file = "uv-0.1.32-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ed6a41164aac4538a5bbb850ab52a6c2a679e9aa642f32f001799fd5a3ccf00c"}, - {file = "uv-0.1.32-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dac71a5abac7c45914acbdc5760be1c7c14c8ce4da7447dfa4f661a57d3d0afe"}, - {file = "uv-0.1.32-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a7547b19596bec70a041d4c74af1cdd5c3f426c9dd0edb5b6c98a159cc65f43f"}, - {file = "uv-0.1.32-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:2d1c85698040efe36b2ddf8b9072c8f01c14a9fa164b5d0a2e6b0dbb11443439"}, - {file = "uv-0.1.32-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:0db70283655a2bee8129562b0d0c33979a9ea0586572402a226ffae370e24d20"}, - {file = "uv-0.1.32-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:47ff7ab9cdadf01033663b74d65a57648f41b81d07f047370b7eefff934680ec"}, - {file = "uv-0.1.32-py3-none-musllinux_1_2_i686.whl", hash = "sha256:5af112155bbd9b0abe7748d6b31186c3c0c8cf7931dc99762cc45ad9f44732f7"}, - {file = "uv-0.1.32-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:c3b9bb6194e3e2ea41174fc49d66d09eeb5566a5b3c6a6476f30ea2342e547f5"}, - {file = "uv-0.1.32-py3-none-win32.whl", hash = "sha256:e10e3a44c73934a78eaac199952585aed1f8b0c742b8b034570b3816cb9071af"}, - {file = "uv-0.1.32-py3-none-win_amd64.whl", hash = "sha256:9365a51e1dd711b8cab661a481b1222dba721497b8a7604bb1fe8e63db900476"}, - {file = "uv-0.1.32.tar.gz", hash = "sha256:339a275711f2c1faab155f47c2e06e272292401ab054ede37d92ef7ebbffad9b"}, + {file = "uv-0.2.11-py3-none-linux_armv6l.whl", hash = "sha256:7a4e8beb576a9d4245d763f2ae2eca709cf0c1a2a706c583c28f467cc99ec7d2"}, + {file = "uv-0.2.11-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:6e3ff93020c28c4d518c1c77bfe0bb46de5949adff389df27ec117eaa4c9b279"}, + {file = "uv-0.2.11-py3-none-macosx_11_0_arm64.whl", hash = "sha256:96d3e2dd7f8a1774a0c0070732cb7d670b23043d4860de4658ff7f597ede93f0"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:33e1129b673054d17d014535bf868bb22051e9437963200a3eea7ddf8aaac6e0"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:81687b0272f472dcd84de16da25cea21e8b697fed8603ecb62c8cdac0a842d15"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:17f429eaf2141d18be22b1dc751d95326b76aebf4b51b589ed4d2fd589792098"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:a2708392c38eee38f2e69384d1f37db0451d89db78d5d98ed89b00e5653a4812"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3bae25daae60f3d59dd82197b8d87cb081bde985c91d5ba2b3bbdecd3ba9b557"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3c3dfee56d0ca79e65dfb33522509d987bffa267fe31b7a48874652ff979c1fa"}, + {file = "uv-0.2.11-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20061c5795811eba07a1470f04dcc543255196c7e872e91ffc4b638dacd8cd0e"}, + {file = "uv-0.2.11-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:f66c5b627348f04bd9773c66dc54a007d42df115a07ccb84678bdb4e3b85836d"}, + {file = "uv-0.2.11-py3-none-musllinux_1_1_armv7l.whl", hash = "sha256:e7f24e40e24ddb66cf2b8bc4dd0a36ee7f727bf63b8c8f26fc5038cf931f98a2"}, + {file = "uv-0.2.11-py3-none-musllinux_1_1_i686.whl", hash = "sha256:8c3b267f2db93170c537efe9521820fef1c542ecf890c863f01ccbbf2ccef22e"}, + {file = "uv-0.2.11-py3-none-musllinux_1_1_ppc64le.whl", hash = "sha256:9da79f8eaebf56d71ad56887510a1a6875d67ec209e1ccceeb9732b8b27e0f5d"}, + {file = "uv-0.2.11-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:8545cd5c3fd27fcb3bed1df4bae95ea33fe07460700091070973b3f1225fd8e7"}, + {file = "uv-0.2.11-py3-none-win32.whl", hash = "sha256:8f00713a3ef6ce46687521ab512bf78b391cf7247ac8500f217a6168cbb9c099"}, + {file = "uv-0.2.11-py3-none-win_amd64.whl", hash = "sha256:edeb6314c9e4061917918016fc84b0cabdcc24a1b4e7d04032dbfb86d41f834e"}, + {file = "uv-0.2.11.tar.gz", hash = "sha256:1ff5742a8daf427bcca99089287871c1b90e8087d8e66182f409a8a39df6eb2d"}, ] [[package]] @@ -808,7 +809,10 @@ files = [ docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +[extras] +uv = ["uv"] + [metadata] lock-version = "2.0" python-versions = ">=3.7.2" -content-hash = "c4a21bc30b8cc6eff9fc63c61ecbee3c21e2407bee0a5df439c63edc546c8b85" +content-hash = "d39104ec7106d12f51f69b015c10af7fab4fb558c1836a8a672f8661f0329cc2" diff --git a/pyproject.toml b/pyproject.toml index fcfde729..f3cca285 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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