Skip to content

Conversation

jemand771
Copy link
Member

@jemand771 jemand771 commented Jul 9, 2025

This PR adds cibuildwheel, a multi-platform multi-arch python wheel builder.
I've also gone ahead and added all required and optional dependencies that weren't in nixpkgs before, hope that's okay workflow-wise.

To actually use this in any meaningful way, you'll need docker/podman, but I don't see a reasonable way to enforce that dependency without a module for cibuildwheel, so I won't.

I was a bit surprised that nixpkgs didn't already have this because cibuildwheel seems like such a unique and relevant tool in the python space. I'm starting to have doubts about "fits contributing.md" + the minimum user rule and hope I'm not the only one (lol); let me know what you think.
(It's worth noting that people - including me until just now - could also have used a venv to install this tool)

I still want to do some more tests before this is ready to review/merge, I'm just creating the PR early to track that someone is working on this. (avoid someone else coincidentally doing the same thing)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Jul 9, 2025
@jemand771 jemand771 force-pushed the cibuildwheel branch 2 times, most recently from 658f858 to e66b5df Compare July 10, 2025 09:08
@jemand771
Copy link
Member Author

built wheels for a small sample project on x86_64 and aarch64, seems to work just fine (why wouldn't it, I guess)

while this package could do with some small automated tests (possibly even running cibuildwheel's own integration tests), I don't really feel like digging into that right now - for now, I think this is ready to go!

@jemand771 jemand771 marked this pull request as ready for review July 10, 2025 13:42
@nix-owners nix-owners bot requested a review from natsukium July 10, 2025 13:44
@jemand771 jemand771 changed the title cibuildwheel: init at 3.0.1 cibuildwheel: init at 3.1.3 Aug 9, 2025
@jemand771 jemand771 force-pushed the cibuildwheel branch 2 times, most recently from d4b54a6 to ea20223 Compare August 9, 2025 20:04
@jemand771
Copy link
Member Author

updated to most recent upstream while I'm at it, sorry for all the force pushes - nixfmt+rebasing skill issue

@nixpkgs-ci nixpkgs-ci bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 16, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 25, 2025
@jemand771
Copy link
Member Author

there's a bit of a funny happening here where the (freshly rebased onto) master has 928d755 but nixos-unstable has ac79170, meaning you can't actually apply this as-is using e.g. nixpkgs-patcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant