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

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

Merged
2 commits merged into from
Aug 25, 2023

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.

Fixes the build time error:
`ModuleNotFoundError: No module named 'setuptools'`.
@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
22 checks passed
@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
AndersonTorres pushed a commit to atorres1985-contrib/nixpkgs that referenced this pull request Sep 1, 2023
…oss compilation""

This reverts commit 68eb957, reversing
changes made to 347a238.
Moving the big rebuild to staging; original PR NixOS#249136, revert NixOS#251367
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants