Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider switching the build-system to flit_core to ease setuptools bootstrap #372

Closed
mgorny opened this issue Jan 16, 2023 · 4 comments

Comments

@mgorny
Copy link

mgorny commented Jan 16, 2023

Could you please consider switching the build system from setuptools to flit_core? This would help Linux distributions such as Gentoo avoid cyclic dependencies that cause bootstrapping unbundled setuptools a real pain. If you agree, I can submit a pull request doing the conversion.

The problem is that the most recent release of setuptools (66.0.0) started using platformdirs. platformdirs use the hatchling build backend which in turn requires this package. This creates a dependency cycle that we can't install setuptools before installing platformdirs, and we can't build platformdirs before all of hatchling's dependencies are installed, and we effectively end up needing setuptools to build them.

flit_core is a "no dependencies [except for tomli, on Python < 3.11]" by design, so it makes bootstrapping packages much easier.

Unfortunately, I don't think it's possible to retain setuptools_scm-style logic then. While there's a flit_scm package providing equivalent functionality, it depends on setuptools_scm which invariably means a cyclic dependency with setuptools.

@RonnyPfannschmidt RonnyPfannschmidt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2023
@RonnyPfannschmidt
Copy link
Member

Flit is a no go, hatchling is planned

I

@bluetech
Copy link
Member

@RonnyPfannschmidt since hatchling depends on pluggy, it does sounds like a good idea to avoid pluggy depending on hatchling. How do we expect distributions to package pluggy with a cyclic dependency like this?

@mgorny
Copy link
Author

mgorny commented Jan 16, 2023

Exactly. Hatchling's author actually pointed out that it does not introduce bootstrap problems because it depends on packages that don't use hatchling…

@RonnyPfannschmidt
Copy link
Member

@bluetech i am currently coordinating the details with the hatch author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants