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

pipenv: refactor runtimeDeps #89293

Merged
merged 1 commit into from Aug 22, 2020
Merged

Conversation

das-g
Copy link
Member

@das-g das-g commented Jun 1, 2020

Make runtimeDeps a function, so that it will return a selection of the packages in the set passed to it by python3.withPackages, rather than the same packages taken directly from python3.pkgs.

Motivation for this change

Follow up to #89164 (comment)

As mentioned in #89164 (comment), I'm unsure whether ignoring the packages python3.withPackages passes to its argument and instead using packages taken directly from python3.pkgs is good style:

with python3.pkgs;
let
runtimeDeps = [
certifi
setuptools
pip
virtualenv
virtualenv-clone
];
pythonEnv = python3.withPackages(ps: with ps; runtimeDeps);

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
    except for:
    • .pipenv-resolver-wrapped
    • .pipenv-wrapped
  • 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.

Result of nixpkgs-review 1
(empty)

Make `runtimeDeps` a function, so that it will return a selection
of the packages in the set passed to it by `python3.withPackages`,
rather than the same packages taken directly from `python3.pkgs`.
@drewrisinger
Copy link
Contributor

Would you like to add yourself as a maintainer?
cc @berdario maintainer @kalekseev from original PR.

Copy link
Contributor

@drewrisinger drewrisinger left a comment

Choose a reason for hiding this comment

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

Diff LGTM.
Looks like OfBorg build works, not tested locally.

@das-g
Copy link
Member Author

das-g commented Jun 1, 2020

Would you like to add yourself as a maintainer?

As I use pipenv less and less (I think I prefer poetry and other alternatives) I'm not too eager, but if it helps NixPkgs, I'm also not against it either.

@kalekseev
Copy link
Contributor

Would you like to add yourself as a maintainer?
cc @berdario maintainer @kalekseev from original PR.

Hi @drewrisinger, thanks for the proposal but I've just started using nix and I'm not sure if I will stick with it or not so it's too early for me to become a maintainer of the package.

@Lassulus
Copy link
Member

I'm gonna merge this for now. People can add them self as maintainers later

@Lassulus Lassulus merged commit d626d15 into NixOS:master Aug 22, 2020
@das-g das-g deleted the refactor-pipenv-runtimeDeps branch August 22, 2020 21:49
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