flux-framework / flux-core

core services for the Flux resource management framework
GNU Lesser General Public License v3.0
159 stars 49 forks source link

flux-python: add posix-compatible shebang wrapper #6041

Closed trws closed 2 weeks ago

trws commented 2 weeks ago

problem: using flux python on minimal systems, say alpine or other minimal systems that do not provide an env -S, is currently non-trivial. Since the shebang only supports a single argument after the command, there's no way to search the path for flux to run flux python

solution: add a flux-python script, which is installed to the same bin path as flux itself, so that #!/usr/bin/env flux-python can be used as a shebang

ping @tgamblin

grondo commented 2 weeks ago

This seems reasonable. I could have sworn we tried this before and gave up for some reason, but I'm finding no history of it. :shrug:

tgamblin commented 2 weeks ago

Ping @jefflong6 @xorjane

trws commented 2 weeks ago

Thanks! This LGTM!

(Note there's an issue with the el8,system builder right now that I'm fixing in an upcoming PR. The failures aren't related to this particular PR)

Thanks @grondo. I set MWP but I'm on a phone today, would you merge if it makes sense or let me know to rebase when the other one's in?

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 83.32%. Comparing base (14677c8) to head (0b7ed69).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6041 +/- ## ========================================== - Coverage 83.34% 83.32% -0.03% ========================================== Files 519 519 Lines 83734 83734 ========================================== - Hits 69789 69771 -18 - Misses 13945 13963 +18 ``` [see 11 files with indirect coverage changes](https://app.codecov.io/gh/flux-framework/flux-core/pull/6041/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flux-framework)