astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.6k stars 466 forks source link

Use python -m build (--wheel) when no pyproject.toml but only setup.py #1189

Open gl-yziquel opened 2 months ago

gl-yziquel commented 2 months ago

Hi.

I like the user experience of rye build. And try to build old projects with it when possible.

As of today, rye requires a pyproject.toml. But some old projects come only with some setup.py.

The python -m build command handles "more or less" gracefully both cases. rye does not.

Could it be possible to default to building old setup.py project with python -m build ? That would provide a more uniform layout to the build instructions for the various projects I build on my box.