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

pythonPackages.pyexcel-ods, pythonPackages.pyexcel-xls: migrate to pynose, pep517 builder #325825

Closed
wants to merge 2 commits into from

Conversation

jchv
Copy link
Contributor

@jchv jchv commented Jul 9, 2024

Description of changes

This should fix the build issues with pyexcel.

Couldn't really find a whole lot to test here, but at least the checks do pass.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/issue-building-nixos-due-to-sip-package/48702/6

@jchv
Copy link
Contributor Author

jchv commented Jul 9, 2024

Result of nixpkgs-review pr 325825 run on x86_64-linux 1

8 packages built:
  • python311Packages.pyexcel-ods
  • python311Packages.pyexcel-ods.dist
  • python311Packages.pyexcel-xls
  • python311Packages.pyexcel-xls.dist
  • python312Packages.pyexcel-ods
  • python312Packages.pyexcel-ods.dist
  • python312Packages.pyexcel-xls
  • python312Packages.pyexcel-xls.dist

@jchv
Copy link
Contributor Author

jchv commented Jul 9, 2024

Result of nixpkgs-review pr 325825 run on aarch64-darwin 1

8 packages built:
  • python311Packages.pyexcel-ods
  • python311Packages.pyexcel-ods.dist
  • python311Packages.pyexcel-xls
  • python311Packages.pyexcel-xls.dist
  • python312Packages.pyexcel-ods
  • python312Packages.pyexcel-ods.dist
  • python312Packages.pyexcel-xls
  • python312Packages.pyexcel-xls.dist

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

Please don't use pynose: #325669
Try using pytestCheckHook instead. You'll have to write a patch as in #325847.

@jchv
Copy link
Contributor Author

jchv commented Jul 9, 2024

Rewriting the entire test suite of anything that uses nose feels like the wrong approach. If there isn't a fork that restores Python 3.12 compatibility, I think the best course of action is patching the original nose instead.

@dotlambda
Copy link
Member

Rewriting the entire test suite of anything that uses nose feels like the wrong approach.

It's almost a drop-in replacement. The necessary changes could be made using sed.

@jchv
Copy link
Contributor Author

jchv commented Jul 9, 2024

Even if it could be done with only sed (I'm skeptical that it will work that way for non-trivial test suites) it doesn't feel like it scales very well. I'd much rather lean on upstreams to try to fix this more permanently. Otherwise, every package that uses nose needs additional patching, and that patching may need to be updated whenever any of those packages are updated. We can fix Nose once per Python upgrade, for all packages that depend on it.

I took a look and Alpine Linux already has patches for this: https://github.com/alpinelinux/aports/tree/master/community/py3-nose - If I pull in python-nose-py311.patch and python-nose-py312.patch it seems to fix the breakages. So we don't even really have to do any original work here.

Are you sure patching Nose isn't the better approach?

@jchv
Copy link
Contributor Author

jchv commented Jul 9, 2024

Failing any strong consensus, I went ahead and made #325935. Personally, it seems to me that it's the best thing for Nixpkgs right now. If people feel strongly enough that it is the wrong way to go, I'll concede, but it really does seem a lot simpler to me.

@emilazy
Copy link
Member

emilazy commented Jul 11, 2024

This should probably be closed now?

@jchv
Copy link
Contributor Author

jchv commented Jul 11, 2024

Yep, good call. This is fixed in staging.

@jchv jchv closed this Jul 11, 2024
@jchv jchv deleted the fix/pyexcel branch July 11, 2024 22:34
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.

4 participants