mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Add setuptools as a dependency on Python 3.12?

Open JukkaL opened this issue 2 years ago • 3 comments

Mypyc needs distutils or setuptools to run, but Python 3.12 no longer bundles distutils (PEP 632). This seems to imply that we need to include setuptools as a dependency of mypy (at least on Python 3.12 or later), or unbundle mypyc into a separate distribution on PyPI. Thoughts?

JukkaL avatar Jul 03 '23 18:07 JukkaL

One possible alternative is to teach mypyc to emit the relevant sources without compiling them, so that people can integrate it into other build systems. :D

eli-schwartz avatar Jul 03 '23 19:07 eli-schwartz

I think fine to include setuptools as a dependency. We could also have a mypyc extra that includes it, like we do for dmypy or reports.

Eli's suggestion sounds great, but is little orthogonal

hauntsaninja avatar Jul 03 '23 19:07 hauntsaninja

We could also have a mypyc extra that includes it, like we do for dmypy or reports.

I'd personally prefer this, but agree that having it as an unconditional dependency would also probably be fine

AlexWaygood avatar Jul 04 '23 17:07 AlexWaygood

I ran into this problem locally and in CI.

nickdrozd avatar Oct 05 '23 20:10 nickdrozd