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

Switched build backend to flit #436

Closed
wants to merge 6 commits into from
Closed

Switched build backend to flit #436

wants to merge 6 commits into from

Conversation

agronholm
Copy link
Contributor

This allows wheel to use isolated builds and not run into a circular dependency (since setuptools requires this project as a dependency for building wheels). As a bonus, we can consolidate all build and tooling configuration into pyproject.toml.

@codecov
Copy link

codecov bot commented Jan 2, 2022

Codecov Report

Merging #436 (23e47ba) into main (ab82cea) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #436   +/-   ##
=======================================
  Coverage   67.57%   67.57%           
=======================================
  Files          12       12           
  Lines         916      916           
=======================================
  Hits          619      619           
  Misses        297      297           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab82cea...23e47ba. Read the comment docs.

@agronholm
Copy link
Contributor Author

It seems there is no way to have flit add a setup.py file using the PEP 517 build process. Is this correct?

@agronholm
Copy link
Contributor Author

pypa/flit#501

@agronholm
Copy link
Contributor Author

Now that I have ditched flit-scm for flit_core, is this now good to go?

pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@layday
Copy link
Member

layday commented Jan 3, 2022

I'll just note that redistributors would have to install flit in addition to flit_core to be able to build a wheel sdist with setup.py if they are to be able to continue installing setuptools + wheel without the aid of PEP 517, and flit depends on several other packages which makes it unsuitable for bootstrapping1. Therefore, redistributors who have been installing wheel from a git checkout (e.g. https://github.com/archlinux/svntogit-community/blob/a594d718f44efc8efa027eb4f7a5d214056bfab0/trunk/PKGBUILD#L19, https://github.com/NixOS/nixpkgs/blob/fec8555fb0598f7a177e88fe69061264e5786155/pkgs/development/python-modules/wheel/default.nix#L13) will need to switch to PyPI.

Something to watch out for is that flit has different package data inclusion criteria for packages built with flit build and the PEP 517 hooks.

Footnotes

  1. packaging and build both still use setuptools, so setuptools will continue to be a bootstrapping requirement.

@agronholm
Copy link
Contributor Author

I am slowly being driven crazy by all these constraints. As for downstream packagers, the only consistent way to get their attention is by breaking something, and that is never a pleasant situation. That said, we do need to move to standardized packaging and I fear that many downstream packagers won't bother to do the migration work until they absolutely must.

Still, I think it would be prudent to open a discussion at discuss.python.org to collect feedback about the planned build configuration changes.

@layday
Copy link
Member

layday commented Jan 3, 2022

I am slowly being driven crazy by all these constraints.

Not just you 😛

@henryiii henryiii mentioned this pull request Feb 18, 2022
1 task
@henryiii
Copy link
Contributor

henryiii commented Feb 24, 2022

FYI, the bootstrapping story should be much better now: pypa/build#394 (comment)

(Though build is not converted yet, I'll try to get to that soonish)

@jameshilliard
Copy link

Though build is not converted yet

Also packaging which is in the dependency tree of build needs to be converted as well.

hooks:
- id: flake8
- id: pyproject-flake8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, Anthony and co. actively fight others adding pyproject.toml support as well, see csachs/pyproject-flake8#13. Currently broken with Flake8 5 though might be fixable for now.

@henryiii
Copy link
Contributor

FYI, Packaging and Build have both moved to Flit. Noticed the circular dependency issue in the last release, which Flit would solve.

@jameshilliard
Copy link

Packaging and Build have both moved to Flit.

Yeah, packaging still needs a new release with flit support from what I can tell however(I see build got one a few days ago).

@henryiii
Copy link
Contributor

Build's 0.9.0 release was right before the Flit transition. We are thinking about doing one soon-ish with the new system, but I'm not sure there's a rush until there's a packaging release.

@jameshilliard
Copy link

Build's 0.9.0 release was right before the Flit transition.

Ah, yeah, just noticed that.

@vishwin
Copy link

vishwin commented Jan 15, 2023

Both build and packaging have released with flit as build backend.

@agronholm agronholm deleted the flit-backend branch November 8, 2024 08:11
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

Successfully merging this pull request may close these issues.

5 participants