Skip to content

Conversation

@GideonBear
Copy link

There's a test failure when setuptools is not installed in the current environment:

---------------------------------------------------------------------------------------- Captured stderr call ----------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pytest-of-gideon/pytest-30/test_python_integration0/gits/setup.py", line 3, in <module>
    from setuptools import setup
ModuleNotFoundError: No module named 'setuptools'
[...]
FAILED tests/make_repo_test.py::test_python_integration - subprocess.CalledProcessError: Command '('/home/gideon/projects/pre-commit-mirror-maker-2/.venv/bin/python3', 'setup.py', 'egg_info')' returned non-zero exit status 1.

uv venv does not install setuptools into the environment by default. Adding setuptools to requirements-dev.txt makes the requirement explicit.

@GideonBear
Copy link
Author

GideonBear commented Dec 28, 2025

When using tox (tox -epy), I could not get it to work without this patch (by installing setuptools manually), presumably because it creates a dedicated venv? But it creates the venv using uv because it's installed? I'm not sure.

In any case I think the dependency on setuptools should be explicit.

@asottile
Copy link
Member

the tests currently only target 3.11 -- when they target 3.12 this change will be necessary (but isn't yet)

@asottile asottile closed this Jan 12, 2026
@GideonBear
Copy link
Author

Is there a reason you're only testing 3.10 and 3.11? It's already getting ran on 3.14 in the workflows (https://github.com/pre-commit/mirrors-mypy/actions/runs/20912986607/job/60079698152).

@GideonBear GideonBear deleted the dev-req-setuptools branch January 12, 2026 18:38
@asottile
Copy link
Member

because the code works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants