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

fix: #64340 building python wheels in non-standard store #64351

Merged
merged 1 commit into from Jul 11, 2019

Conversation

cdyson37
Copy link
Contributor

@cdyson37 cdyson37 commented Jul 5, 2019

Motivation for this change

This fixes issue #64340 which prevents Python wheels being installed in nix stores that contain at -.

I've tested it with

nix-build -E 'with import ./default.nix {}; python37.withPackages (p: [p.tensorflow-estimator p.ipython p.tensorflow])'

and checked I can import tensorflow. I did not test it with a non-standard store path (I don't have access to one easily right now) but am happy to do so.

I'm not sure of the contributing conventions for PRs that don't concern specific packages or nixos modules, happy to make any changes required.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@veprbl
Copy link
Member

veprbl commented Jul 5, 2019

Why not just use cp "$src" "dist/$(stripHash "$src")"?

@FRidh
Copy link
Member

FRidh commented Jul 6, 2019

Why not just use cp "$src" "dist/$(stripHash "$src")"?

I knew there was a function for that but could not think of the name, thanks!

@cdyson37
Copy link
Contributor Author

cdyson37 commented Jul 6, 2019

Happy to change it. Do you want me to squash?

Also: does it actually matter what the directory is called? And could we get a name from attrs?

@FRidh
Copy link
Member

FRidh commented Jul 6, 2019

Happy to change it. Do you want me to squash?

Yes, please.

does it actually matter what the directory is called?

The installPhase requires the wheel to be in the dist folder and to have a certain name.

And could we get a name from attrs?

There is the ${src} attribute, but we now use the shell variable $src which should be the same. I see no reason for changing that.

@cdyson37 cdyson37 force-pushed the fix/64340-build-python-package-wheel branch from 35f17c1 to 7e2c07f Compare July 6, 2019 10:24
@FRidh
Copy link
Member

FRidh commented Jul 11, 2019

@GrahamcOfBorg build python3.pkgs.requests_wheel

@FRidh
Copy link
Member

FRidh commented Jul 11, 2019

@GrahamcOfBorg build python3.pkgs.requests_download

@FRidh FRidh merged commit 0426ae6 into NixOS:master Jul 11, 2019
@cdyson37 cdyson37 deleted the fix/64340-build-python-package-wheel branch July 11, 2019 10:01
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

3 participants