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

python311Packages.scipy: remove references to dev outputs #298685

Merged
merged 1 commit into from Mar 27, 2024

Conversation

SuperSandro2000
Copy link
Member

@SuperSandro2000 SuperSandro2000 commented Mar 24, 2024

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.

@doronbehar
Copy link
Contributor

doronbehar commented Mar 24, 2024 via email

@SuperSandro2000
Copy link
Member Author

nuke-reference replaces the paths in the file referencing the build time dependencies with fake nix store paths only containing eeeeees.

@doronbehar
Copy link
Contributor

doronbehar commented Mar 24, 2024 via email

@doronbehar
Copy link
Contributor

OK I found my answer at: https://discourse.nixos.org/t/whats-the-difference-between-removereferencesto-and-nukereferences/35075

Also @SuperSandro2000 , could you show please which references were there before and after this change? I'd like to spare my self building this package on the staging. Also, I would like to know where those references are retained in $out.. Perhaps this is something that can be discussed with upstream, like this patch that wasn't accepted upstream.

@SuperSandro2000
Copy link
Member Author

SuperSandro2000 commented Mar 25, 2024

What is the difference between that and remove-references-to?

nuke-references just removes all, while remove-references-to takes a specific list.

Perhaps this is something that can be discussed with upstream, like this patch that wasn't accepted upstream.

I think this is somehow related to the build system, numpy has the same file with similar content.

The pyc file is just the compiled bytecode from python. We compile with -OO but the test run I think with only -O and our hook is not cleaning that up somehow.

--- result-before/lib/python3.11/site-packages/scipy/__config__.py
+++ result-after/lib/python3.11/site-packages/scipy/__config__.py
@@ -55,15 +55,15 @@
                 "version": "13.2.0",
                 "commands": "gfortran",
                 "args": "",
                 "linker args": "",
             },
             "pythran": {
                 "version": "0.15.0",
-                "include directory": r"/nix/store/5ia6f6sfzqg4831sqa548hxqz3x7ryc4-python3.11-pythran-0.15.0/lib/python3.11/site-packages/pythran"
+                "include directory": r"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-python3.11-pythran-0.15.0/lib/python3.11/site-packages/pythran"
             },
         },
         "Machine Information": {
             "host": {
                 "cpu": "x86_64",
                 "family": "x86_64",
                 "endian": "little",
@@ -82,35 +82,35 @@
                 "name": "blas",
                 "found": bool("True".lower().replace('false', '')),
                 "version": "3",
                 "detection method": "pkgconfig",
                 "include directory": r"unknown",
                 "lib directory": r"unknown",
                 "openblas configuration": "unknown",
-                "pc file directory": r"/nix/store/217gkl46213hrszin5mx2ga6aifmp96h-blas-3-dev/lib/pkgconfig",
+                "pc file directory": r"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-blas-3-dev/lib/pkgconfig",
             },
             "lapack": {
                 "name": "lapack",
                 "found": bool("True".lower().replace('false', '')),
                 "version": "3",
                 "detection method": "pkgconfig",
                 "include directory": r"unknown",
                 "lib directory": r"unknown",
                 "openblas configuration": "unknown",
-                "pc file directory": r"/nix/store/jg131f5mbra6aps97j0if05m9ml2008l-lapack-3-dev/lib/pkgconfig",
+                "pc file directory": r"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-lapack-3-dev/lib/pkgconfig",
             },
             "pybind11": {
                 "name": "pybind11",
                 "version": "2.11.1",
                 "detection method": "pkgconfig",
-                "include directory": r"/nix/store/qiwimi4yv292pny7fgdqi4mrxr0ylxb0-python3.11-pybind11-2.11.1/include",
+                "include directory": r"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-python3.11-pybind11-2.11.1/include",
             },
         },
         "Python Information": {
-            "path": r"/nix/store/7wz6hm9i8wljz0hgwz1wqmn2zlbgavrq-python3-3.11.8/bin/python3.11",
+            "path": r"/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-python3-3.11.8/bin/python3.11",
             "version": "3.11",
         },
     }
 )
 
 
 def _check_pyyaml():

@doronbehar doronbehar merged commit 276cb5f into NixOS:staging Mar 27, 2024
25 checks passed
@doronbehar
Copy link
Contributor

Great thanks for the explanation! It's good to have this documented at least here.

@SuperSandro2000 SuperSandro2000 deleted the scipy-dev branch March 27, 2024 12:14
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

2 participants