-
Notifications
You must be signed in to change notification settings - Fork 46
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
ClusterRunner usage prints main.py instead of executable name #349
Comments
We can fix this in argparse but I feel like the default behavior of argparse is very sensible -- it tries to print a message that matches how the application was invoked. @gcurtis I'm wondering if Flute should handle this as a more general case. It seems like Flute could create a wrapper that calls main.py in such a way that sys.argv[0] would be set correctly. (For example, maybe Flute could create a symlink which matches the entry point named as defined in the .flute file, then creates a wrapper that executes via the symlink.)
|
Just to clarify, I believe this is specific to Flute-built RPMs. When building with cx_Freeze we did not have this problem. |
I feel like adding a symlink would be kind of hacky. Why do we not just want to change the # /usr/local/bin/pip
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) |
It's just the reason I stated above -- the default behavior for argparse makes sense. If I'm running it via To be clear I'm totally fine with fixing in argparse, I just wanted to make the point that this is technically Flute's responsibility since:
|
Actually, it looks like we can do |
Oh good one. Way better than symlink. 👍 |
ClusterRunner should print name of executable i.e.
clusterrunner
when outputting help/usage.Here is the current output.
[root@pod4101-overmind01-jenkins-slave-packer-builder ClusterRunner]# clusterrunner -h usage: main.py [-h] [-V] {master,slave,stop,deploy,build,shutdown} ...
The text was updated successfully, but these errors were encountered: