python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.15k stars 2.25k forks source link

Idea: build poetry wheels using mypyc #5746

Open uSpike opened 2 years ago

uSpike commented 2 years ago

Feature Request

https://mypyc.readthedocs.io/en/latest/index.html is a pretty cool tool that can turn type-annotated code into compiled C extensions.

I think it's worth investigating whether poetry/poetry-core could be sped up by compiling native binary wheels and (optionally?) using compiled code to execute.

@ichard26 wrote a very interesting series of blog posts about doing this same optimization to black: https://ichard26.github.io/blog/2022/05/31/compiling-black-with-mypyc-part-1

dimbleby commented 2 years ago

MRs welcome, I expect, but whenever I've tried - more in hope than expectation - to use mypyc I've found that it is way too alpha and it's really hard to get it working on a project of any substance.

Would be glad to be shown wrong!