Skip to content

Comments

python3Packages.pillow & python3Packages.pillow-simd: Fix cross compilation#249136

Merged
2 commits merged intoNixOS:masterfrom
OroraTech:chore/fix-pillow
Aug 25, 2023
Merged

python3Packages.pillow & python3Packages.pillow-simd: Fix cross compilation#249136
2 commits merged intoNixOS:masterfrom
OroraTech:chore/fix-pillow

Conversation

@kip93
Copy link
Contributor

@kip93 kip93 commented Aug 14, 2023

Fixes the build time error:
ModuleNotFoundError: No module named 'setuptools'.

Description of changes

Added setuptools on nativeBuildInputs, so that it's available at build time when cross compiling.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux (cross compiled from x86_64-linux)
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (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.

kip93 added 2 commits August 14, 2023 13:07
Fixes the build time error:
`ModuleNotFoundError: No module named 'setuptools'`.
@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Aug 14, 2023
@ofborg ofborg bot added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Aug 14, 2023
@ofborg ofborg bot requested review from cillianderoiste and prikhi August 14, 2023 16:04
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches. labels Aug 14, 2023
@FRidh
Copy link
Member

FRidh commented Aug 14, 2023

The hook should make setuptools available, even when cross-compiling.

@kip93
Copy link
Contributor Author

kip93 commented Aug 14, 2023

From what I can see it only gets added if using setuptools format, but pillow uses pyproject. And I can see many packages that use pyproject adding setuptools manually, so it does not seem like I'm doing something crazy here.

Copy link
Contributor

@Majiir Majiir left a comment

Choose a reason for hiding this comment

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

LGTM. Confirmed this fixes cross-compiling for armv7l.

bdf1a96 (from #244135) changed pillow's format from setuptools to pyproject. Other packages in that same PR added setuptools to nativeBuildInputs for this purpose, so I think you are in the clear.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Fixed pkgsCross.*.python3Packages.pillow for me.

@ghost ghost merged commit 0fdae68 into NixOS:master Aug 25, 2023
@kip93 kip93 deleted the chore/fix-pillow branch August 25, 2023 11:21
@vcunat
Copy link
Member

vcunat commented Aug 25, 2023

This causes over 13k rebuilds in total. Why merge directly to master?

@kip93
Copy link
Contributor Author

kip93 commented Aug 25, 2023

Don't the docs say that small changes go to master? Or did I miss something?

I just saw that the CONTRIBUTING.md file got recently expanded from the time I created this PR, maybe I just missed something new there, I'll go re-read it. Sorry!

EDIT: Yes, I just saw the new flow of merged pull requests section about branches. Again, SORRY!

@kip93 kip93 restored the chore/fix-pillow branch August 25, 2023 13:23
@vcunat
Copy link
Member

vcunat commented Aug 25, 2023

The automatic red rebuild-* labels are there to signify that the PR is probably too large a rebuild. I'm sure it's expected that contributors with little experience may not know things like that; so IMHO this is more of a responsibility of the person who does the merge (though it's nice when others notice and comment about it, too).

vcunat added a commit that referenced this pull request Aug 25, 2023
…oss compilation""

This reverts commit 68eb957, reversing
changes made to 347a238.
Moving the big rebuild to staging; original PR #249136, revert #251367
@vcunat
Copy link
Member

vcunat commented Aug 25, 2023

Reapplied in 094bfcf

@kip93 kip93 deleted the chore/fix-pillow branch August 28, 2023 07:36
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 6.topic: python Python is a high-level, general-purpose programming language. 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 2501-5000 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants