flit: Cannot add setup.py through the PEP 517 hook

Using flit as the build back-end, there seems to be no way to specify that I want to generate a setup.py. For wheel, this is important to have for now. The help for flit build also incorrectly states that generating a setup.py is the default. Would you consider adding a configuration option in pyproject.toml for this, under [tool.flit.sdist]?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (19 by maintainers)

Most upvoted comments

Whew. There’s quite a lot written here before I read any of it, so apologies if I’ve missed some of it.

It seems that the motivation for this request is coming from @jameshilliard’s issues with PEP 517 backends and tooling. We’re working on this - in particular, flit_core now vendors tomli to avoid the circular dependency. I’d rather focus on moving forwards and fixing the issues with the new way of doing things rather than making it easier to go back to the old way of doing things. We’ve just turned setup.py generation off by default, it’s never been part of flit_core, and I would hope to get rid of it entirely within another year or two. Every time someone complains about its limitations, I get an itch to rip it out faster.

If you are considering using Flit to package wheel as a way out of the dependency cycle with setuptools - or for any other piece of packaging infrastructure that might be involved in bootstrapping - I would really recommend not involving flit-scm, on the KISS principle. I can understand the desire, but I think packaging tools themselves should avoid extra complexity in their packaging. I wasn’t aware of flit-scm until just now, and I’m mildly annoyed that it’s using the name of Flit like that.

There is at least one downstream integrator who cannot yet handle the PEP 517 process in their automation, necessitating a setup.py in the sdist. I am trying to get more information to determine how pressing this need is.

I can work around this by using flit build instead of the standard build tool, so it’s not a major issue.