Skip to content

fish: make python an optional dependency #86316

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

Merged
merged 1 commit into from May 10, 2021
Merged

fish: make python an optional dependency #86316

merged 1 commit into from May 10, 2021

Conversation

ghost
Copy link

@ghost ghost commented Apr 29, 2020

Motivation for this change

Fish needs Python only for generating completions from man pages and the web config editor, so people may want to avoid depending on it. Even without depending on Python, the functions can still be called by adding Python to $PATH(using e.g. nix-shell). The package still depends on Python by default.

Notes

These days fish only uses the __fish_anypthon function to find an interpreter to use, so using sed or propagating python isn't necessary anymore.

cc @adisbladis

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/)
  • 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.

Sorry, something went wrong.

@cole-h
Copy link
Member

cole-h commented Apr 29, 2020

@ofborg eval

Also, let's get an eval going...

Copy link
Member

@cole-h cole-h 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. Overall in favor of this change. fish_config with Python disabled fails, as expected.

EDIT: Closure goes from 190.3M to 125.5M with Python disabled, according to nix path-info -Sh ./result.

[2 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/86316
1 package built:
fish

@ofborg build fish

@ryantm ryantm added 2.status: merge conflict This PR has merge conflicts with the target branch and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Oct 3, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/519

@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label May 9, 2021
@ofborg ofborg bot requested review from cole-h and removed request for ocharles May 9, 2021 21:55
Copy link
Contributor

@fricklerhandwerk fricklerhandwerk 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, I'd just like to see some rationale in the commit message (see line comment).

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Python is still used for tests, but does not become part of the closure.

In addition, nowadays fish only ever uses Python via __fish_anypython,
so using sed or propagating python isn't necessary anymore.
Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

Sorry this was left alone for so long. The good news is: now I can merge it myself :)

Diff LGTM, just testing it out locally and then I'll merge. Thanks!

@cole-h cole-h merged commit 0ffab92 into NixOS:master May 10, 2021
@cole-h
Copy link
Member

cole-h commented May 10, 2021

Thanks again :)

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