pex-tool / pex

A tool for generating .pex (Python EXecutable) files, lock files and venvs.
https://docs.pex-tool.org/
Apache License 2.0
2.52k stars 258 forks source link

Switch to the `hatchling` build backend. #2331

Closed jsirois closed 7 months ago

jsirois commented 7 months ago

This should elminate flaky CI due to ephemeral dirs in the source root created by the setuptools build backend which were not multi-process safe.

The hatchling build backend supports metadata plugins and it performs isolated builds making it a good replacement for the prior setuptools hack for effecting dynamic Requires-Python to enable Python 3.13 shadow-support. Unfortunately, there is no nice way to specify an in-tree plugin; so we actually use a very thin in-tree build backend that wraps hatchling.build, to allow discovery of our in-tree plugin.