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

python310Packages.setuptools-scm: fix cross compile of dependents #179728

Merged

Conversation

squalus
Copy link
Member

@squalus squalus commented Jun 30, 2022

Description of changes

Packages depending on setuptools-scm need the setuptools module at build time. Add setuptools to the propagatedBuildInputs so this is guaranteed. This fixes cross compile of the dependent packages.

For example, these builds will now succeed:

nix-build -A pkgsCross.aarch64-multiplatform.python310Packages.zipp
nix-build -A pkgsCross.aarch64-multiplatform.python310Packages.importlib-resources

Before this change, it would fail with this error: ModuleNotFoundError: No module named 'setuptools'

Merging to staging as it causes a mass rebuild.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Packages depending on setuptools-scm need the setuptools module at
build time. Add setuptools to the propagatedBuildInputs so this is
guaranteed. This fixes cross compile of the dependent packages.
@squalus squalus added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jun 30, 2022
@squalus
Copy link
Member Author

squalus commented Jun 30, 2022

cc @SuperSandro2000. You suggested using propagatedNativeBuildInputs in #179661. I found that didn't work, but propagatedBuildInputs did.

@jonringer
Copy link
Contributor

@GrahamcOfBorg eval

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2022

Successfully created backport PR #184549 for staging-22.05.

@FRidh
Copy link
Member

FRidh commented Aug 9, 2022

We should be able to somewhat better detect when we're missing setuptools with #185815.

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.

6 participants