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

Python package fixes #311156

Closed
wants to merge 5 commits into from
Closed

Python package fixes #311156

wants to merge 5 commits into from

Conversation

pyrox0
Copy link
Member

@pyrox0 pyrox0 commented May 12, 2024

Fixes a few packages that are broken on python 3.12, mainly related to their usage of nose, by disabling tests or otherwise migrating them to pytestCheckHook.
This also migrates binwalk to the supported fork at OSPG/binwalk, which also fixes a nose issue by it migrating to pytest.

Description of changes

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.05 Release Notes (or backporting 23.05 and 23.11 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.

Copy link
Member

@layus layus left a comment

Choose a reason for hiding this comment

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

Looks okay to me. I do not understand why you have taken on you to change the with lib; from meta, but I am not one to bikeshed on these things.

Thanks for the work.
I will wait a bit to let others review it too. Do not hesitate to ping me if it is not merged withing the next few days.

Copy link
Member

@natsukium natsukium left a comment

Choose a reason for hiding this comment

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

I recommend submitting one PR per package next time.

In #311054, hexa says

On top of that, packages relying on nose have largely been unmaintained and might be dead leafs or using another test framework entirely. It is also to be expected that they need to be converted to the PEP517 builder in the process of fixing them.

This indicates that we need to change the packages significantly.

pkgs/development/python-modules/binwalk/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/binwalk/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/binwalk/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/blessings/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/blessings/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/cgroup-utils/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/chart-studio/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/citeproc-py/default.nix Outdated Show resolved Hide resolved
@pyrox0
Copy link
Member Author

pyrox0 commented Jun 17, 2024

Updated to fix previous merge conflicts.

@pyrox0 pyrox0 force-pushed the nose-removal-1 branch 2 times, most recently from 9752915 to 4724e85 Compare July 9, 2024 05:23
@pyrox0
Copy link
Member Author

pyrox0 commented Jul 9, 2024

This previously had changes related to Capstone's Python bindings. Those have been dropped as out-of-scope for this PR, and can be resubmitted later once upstream fully drops distutils in a later release.

@amarshall
Copy link
Member

FYI binwalk got updated to fork in #326295

They require privilaged filesystem access(/proc), so they do not run in
Nix's sandbox.
Updates to the community supported fork of binwalk, and modernizes the
code to modern Nix Python packaging standards.
@pyrox0
Copy link
Member Author

pyrox0 commented Jul 13, 2024

merge conflict fixed.

@pyrox0
Copy link
Member Author

pyrox0 commented Jul 26, 2024

Closing since this has been superseded by multiple other PRs and it's no longer needed.

@pyrox0 pyrox0 closed this Jul 26, 2024
@pyrox0 pyrox0 deleted the nose-removal-1 branch August 4, 2024 23:21
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.

7 participants