wheel icon indicating copy to clipboard operation
wheel copied to clipboard

Document configuring with `pyproject.toml`

Open bgilbert opened this issue 2 years ago • 5 comments

This page notes that wheel reads settings from setup.cfg, but wheel's documentation is silent on whether pyproject.toml can be used instead. It appears that it can:

[tool.distutils.bdist_wheel]
py-limited-api = "cp311"

Please consider explicitly documenting this.

bgilbert avatar Nov 11 '23 09:11 bgilbert

I had no idea this would work.

agronholm avatar Nov 12 '23 11:11 agronholm

Last I heard this was still experimental.

Also, setting tool.distutils.bdist_wheel.universal = true, which declares a wheel can be run with Python 2 and 3, in a way that is not supported on any version of setuptools that supports Python 2, seems… strange.

henryiii avatar Nov 12 '23 16:11 henryiii

That's fair. I used universal = true as an example because the existing docs do too, but the setting I actually needed this for was py-limited-api (#583).

bgilbert avatar Nov 12 '23 16:11 bgilbert

@abravalheri is this something that can be shown in docs yet?

henryiii avatar Nov 12 '23 19:11 henryiii

Unfortunately not, the only stable way of changing these parameters is via setup.cfg.

I have been a bit busy lately but my intention is to "solve" config_settings first and then move to ext_modules and maybe later look into that. If anyone would like to champion these kind of configs in pyproject.toml, please feel free to open a discussion on the setuptools repo.

But it is extremely unlikely it will stabilise with the distutils name on it (so further changes are required).

abravalheri avatar Nov 12 '23 20:11 abravalheri