Closed jab closed 2 months ago
UV does not install setuptools by default, however we have a configuration called uv_seed=true with which you can enable that behavior, should you need it. So this is expected.
Check our readme there's an explanation about it in there.
I didn't think I needed uv_seed
since (1) tox-uv
was working fine without uv_seed
until I upgraded uv, (2) my project uses PEP 517 build isolation and does not require pip
, setuptools
or wheel
to be pre-installed in order for python -m build
to successfully build it (I just tested again in a virtualenv with no seed packages installed to make double extra sure), (3) when I add uv_seed = true
to my tox.ini and try again I still get the same error.
Looks like that did the trick, thanks for the quick fix.
Issue
I upgraded uv from 0.1.26 to the latest version, 0.2.17, then tried running
tox
, and it failed with the error below. I uninstalled tox-uv, tried runningtox
again, and it worked.Environment
Provide at least:
Output of
```console ❯ uv pip list Package Version Editable project location ----------------------------- ----------- ------------------------- alabaster 0.7.16 attrs 23.2.0 babel 2.15.0 beautifulsoup4 4.12.3 bidict 0.23.2.dev0 /Users/jab/src/bidict cachetools 5.3.3 certifi 2024.6.2 chardet 5.2.0 charset-normalizer 3.3.2 colorama 0.4.6 coverage 7.5.4 coverage-enable-subprocess 1.0 distlib 0.3.8 docutils 0.21.2 execnet 2.1.1 filelock 3.15.4 furo 2024.5.6 hypothesis 6.104.1 icdiff 2.0.7 idna 3.7 imagesize 1.4.1 iniconfig 2.0.0 jinja2 3.1.4 markdown-it-py 3.0.0 markupsafe 2.1.5 mdurl 0.1.2 mypy 1.10.1 mypy-extensions 1.0.0 packaging 24.1 platformdirs 4.2.2 pluggy 1.5.0 pprintpp 0.4.0 py-cpuinfo 9.0.0 pygments 2.18.0 pyproject-api 1.7.1 pytest 8.2.2 pytest-benchmark 4.0.0 pytest-clarity 1.0.1 pytest-icdiff 0.9 pytest-sphinx 0.6.3 pytest-xdist 3.6.1 requests 2.32.3 rich 13.7.1 setuptools 70.1.1 snowballstemmer 2.2.0 sortedcollections 2.1.0 sortedcontainers 2.4.0 soupsieve 2.5 sphinx 7.3.7 sphinx-basic-ng 1.0.0b2 sphinx-copybutton 0.5.2 sphinxcontrib-applehelp 1.0.8 sphinxcontrib-devhelp 1.0.6 sphinxcontrib-htmlhelp 2.0.5 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.7 sphinxcontrib-serializinghtml 1.1.10 tox 4.15.1 tox-uv 1.9.0 typing-extensions 4.12.2 urllib3 2.2.2 uv 0.2.17 virtualenv 20.26.3 ```pip list
of the host Python, wheretox
is installedOutput of running tox
Output of
```console ❯ tox -rvv -e py312 py312: 83 W remove tox env folder /Users/jab/src/bidict/.tox/py312 [tox/tox_env/api.py:323] .pkg: 84 W remove tox env folder /Users/jab/src/bidict/.tox/.pkg [tox/tox_env/api.py:323] py312: 87 W venv> .venv/bin/uv venv -p /Users/jab/src/bidict/.venv/bin/python --allow-existing -v /Users/jab/src/bidict/.tox/py312 [tox/tox_env/api.py:425] DEBUG uv 0.2.17 DEBUG Checking for Python interpreter at path `.venv/bin/python` Using Python 3.12.3 interpreter at: .venv/bin/python Creating virtualenv at: .tox/py312 INFO Allowing existing directory py312: 99 I exit 0 (0.01 seconds) /Users/jab/src/bidict> .venv/bin/uv venv -p /Users/jab/src/bidict/.venv/bin/python --allow-existing -v /Users/jab/src/bidict/.tox/py312 pid=16398 [tox/execute/api.py:286] py312: 102 W install_deps> .venv/bin/uv pip install -r dev-deps/test.txt -v [tox/tox_env/api.py:425] DEBUG uv 0.2.17 DEBUG Checking for Python interpreter at path `.venv/bin/python` DEBUG Using Python 3.12.3 environment at .venv/bin/python DEBUG Acquired lock for `.venv` DEBUG Requirement satisfied: attrs==23.2.0 DEBUG Requirement satisfied: attrs>=22.2.0 DEBUG Requirement satisfied: coverage DEBUG Requirement satisfied: coverage-enable-subprocess==1.0 DEBUG Requirement satisfied: coverage==7.5.4 DEBUG Requirement satisfied: execnet==2.1.1 DEBUG Requirement satisfied: execnet>=2.1 DEBUG Requirement satisfied: hypothesis==6.104.1 DEBUG Requirement satisfied: iniconfig DEBUG Requirement satisfied: iniconfig==2.0.0 DEBUG Requirement satisfied: mypy-extensions==1.0.0 DEBUG Requirement satisfied: mypy-extensions>=1.0.0 DEBUG Requirement satisfied: mypy==1.10.1 DEBUG Requirement satisfied: packaging DEBUG Requirement satisfied: packaging==24.1 DEBUG Requirement satisfied: pluggy<2.0, >=1.5 DEBUG Requirement satisfied: pluggy==1.5.0 DEBUG Requirement satisfied: py-cpuinfo DEBUG Requirement satisfied: py-cpuinfo==9.0.0 DEBUG Requirement satisfied: pytest-benchmark==4.0.0 DEBUG Requirement satisfied: pytest-sphinx==0.6.3 DEBUG Requirement satisfied: pytest-xdist==3.6.1 DEBUG Requirement satisfied: pytest==8.2.2 DEBUG Requirement satisfied: pytest>=3.8 DEBUG Requirement satisfied: pytest>=7.0.0 DEBUG Requirement satisfied: pytest>=8.1.1 DEBUG Requirement satisfied: sortedcollections==2.1.0 DEBUG Requirement satisfied: sortedcontainers DEBUG Requirement satisfied: sortedcontainers<3.0.0, >=2.1.0 DEBUG Requirement satisfied: sortedcontainers==2.4.0 DEBUG Requirement satisfied: typing-extensions==4.12.2 DEBUG Requirement satisfied: typing-extensions>=4.1.0 Audited 19 packages in 1ms py312: 113 I exit 0 (0.01 seconds) /Users/jab/src/bidict> .venv/bin/uv pip install -r dev-deps/test.txt -v pid=16399 [tox/execute/api.py:286] .pkg: 115 W venv> .venv/bin/uv venv -p /Users/jab/src/bidict/.venv/bin/python --allow-existing -v /Users/jab/src/bidict/.tox/.pkg [tox/tox_env/api.py:425] DEBUG uv 0.2.17 DEBUG Checking for Python interpreter at path `.venv/bin/python` Using Python 3.12.3 interpreter at: .venv/bin/python Creating virtualenv at: .tox/.pkg INFO Allowing existing directory .pkg: 124 I exit 0 (0.01 seconds) /Users/jab/src/bidict> .venv/bin/uv venv -p /Users/jab/src/bidict/.venv/bin/python --allow-existing -v /Users/jab/src/bidict/.tox/.pkg pid=16400 [tox/execute/api.py:286] .pkg: 124 W install_requires> .venv/bin/uv pip install 'setuptools>=40.9.0' -v [tox/tox_env/api.py:425] DEBUG uv 0.2.17 DEBUG Checking for Python interpreter at path `.venv/bin/python` DEBUG Using Python 3.12.3 environment at .venv/bin/python DEBUG Acquired lock for `.venv` DEBUG Requirement satisfied: setuptools>=40.9.0 Audited 1 package in 0.77ms .pkg: 133 I exit 0 (0.01 seconds) /Users/jab/src/bidict> .venv/bin/uv pip install 'setuptools>=40.9.0' -v pid=16401 [tox/execute/api.py:286] .pkg: 134 W _optional_hooks> python /Users/jab/src/bidict/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta [tox/tox_env/api.py:425] py312: 160 E packaging backend failed (code=-5), with FailedToStart: could not start backend failed to start backend Traceback (most recent call last): File "/Users/jab/src/bidict/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py", line 139, intox -rvv
For now I am commenting out my tox-uv dependency. This can be reproduced by cloning https://github.com/jab/bidict, running
init_dev_env
, installingtox-uv
the resulting.venv
, then runningtox
.