From 3424f7a35127504e93801b6c60a65048af180fe7 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Tue, 15 Oct 2024 17:25:26 +0100 Subject: [PATCH] Start using uv instead of pip (#45) --- .config/requirements-test.in | 1 + .github/workflows/tox.yml | 2 +- tox.ini | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.config/requirements-test.in b/.config/requirements-test.in index 1f9311e..ffd799e 100644 --- a/.config/requirements-test.in +++ b/.config/requirements-test.in @@ -2,3 +2,4 @@ coverage-enable-subprocess # see https://github.com/nedbat/coveragepy/issues/134 coverage[toml] >= 6.4.4 pytest >= 7.2.2 pytest-xdist >= 2.1.0 +uv diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 6d491d4..00ad6bf 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -52,7 +52,7 @@ jobs: cache-dependency-path: .config/requirements*.in cache: pip python-version: ${{ matrix.python_version }} - - run: pip3 install -U tox + - run: python3 -m pip install -U uv tox tox-uv - run: "${{ matrix.command }}" codeql: name: codeql diff --git a/tox.ini b/tox.ini index 9e2e22a..0798815 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,15 @@ # spell-checker:ignore linkcheck basepython changedir envdir envlist envname envsitepackagesdir passenv setenv testenv toxinidir toxworkdir usedevelop doctrees envpython posargs minversion showlocals REQPASS PYTHONPYCACHEPREFIX PYTHONIOENCODING PYTHONBREAKPOINT [tox] -minversion = 4.6.3 +minversion = 4.21.2 envlist = lint py isolated_build = true skip_missing_interpreters = True requires = - tox >= 4.6.3 + tox >= 4.21.2 + tox-extra >= 2.0.2 + tox-uv >= 1.15.0 setuptools >= 65.3.0 # editable installs [testenv] @@ -18,7 +20,7 @@ extras = commands_pre = sh -c "rm -f {envdir}/.coverage.* 2>/dev/null || true" # safety measure to assure we do not accidentally run tests with broken dependencies - {envpython} -m pip check + uv pip check commands = coverage run -m pytest {posargs:\ -v \