I’ve just had a Linux distro maintainer reach out to me on the
editables project, asking about switching to flit as a build backend. Apparently, the dependency chain for setuptools involves platformdirs, which is built using hatchling, which uses editables, which uses setuptools (!)
The problem comes when distributors want to debundle dependencies from setuptools, when having a circular set of build dependencies is an issue. This is something that setuptools doesn’t formally support, but debundling is a common request and something that I think deserves a certain amount of consideration. I.e., even if the consensus is that as a community, we won’t support debundling, I think it’s better as a community agreement rather than expecting each project in the chain to make their own decision (as the author of editables, the debundling is happening 3 levels higher up in the chain than me, for example, so why do I even need to have an opinion on it?)
It appears that
flit_core is the only build backend with no dependencies (apart from tomli on older versions of Python, so not even that really!) so in order to break a chain like this, people need to use flit. I have my own personal reservations about flit as a build tool, but they aren’t relevant here. The question is whether it’s reasonable to have flit be in a “special position” as the only dependency-free build backend. (I don’t even know whether flit’s author would want to promise that property as a long-term commitment).
The ability to have “in-tree” build backends was added to PEP 517, specifically to try to avoid bootstrapping issues for build backends. It wasn’t focused precisely on the debundling issue, but it seems like it should be relevant here, and yet it’s either not being used by backends, or isn’t actually helpful.
What are people’s views on this issue? Is “sorry, debundling isn’t my problem” a sufficient response here, and are we as a community OK with the implications of this?
As far as editables is concerned, I won’t be moving to flit. I would consider other build backends (indeed, I intend at some point to move off setuptools anyway) but I won’t be considering the dependency issue and its impact on debundling except as a potential tiebreaker between two otherwise-equal options (which is not something I think is likely in practice).