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: use fixed-point combinator, add pkgs to interpreter #20893

Merged
merged 3 commits into from
Dec 5, 2016

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Dec 4, 2016

Motivation for this change

Use a fixed-point combinator for the Python package set to allow easier overriding of its contents.
Earlier implementations were proposed in #16784 and #17428. This commit is by comparison much smaller and changes only what is needed.

A package set is constructed for a specific interpreter. Therefore, we add the
possibility to override the package set to the interpreter. This should make it
easier to override the interpreter and the package set at the same time.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@FRidh, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bennofs, @chaoflow, @edolstra and @FRidh to be potential reviewers.

@FRidh
Copy link
Member Author

FRidh commented Dec 4, 2016

This is a smaller change than I proposed in #16784.

All packages work just fine with this change. With this change I don't think it will be possible anymore to have overrides of self inside the package set. This was done in the past to make chains of packages use a different version. While that sounds useful it is also very fragile since Python can handle only one version of a package at a time.

Use a fixed-point combinator for the Python package set to allow easier overriding of its contents.
Earlier implementations were proposed in NixOS#16784 and NixOS#17428. This commit is by comparison much smaller
and changes only what is needed.
A package set is constructed for a specific interpreter. Therefore, we add the
possibility to override the package set to the interpreter. This should make it
easier to override the interpreter and the package set at the same time.
@domenkozar
Copy link
Member

You rock :)

johbo added a commit to nix-community/pip2nix that referenced this pull request Dec 23, 2016
Since NixOS/nixpkgs#20893
the python packages are based on a fix point combinator and they don't support
the attribute override anymore.

This commit adjusts the template for default.nix so that it works with the
upcoming change and still supports the old variant.
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

4 participants