-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
path and python version values for version message formatting #1756
Comments
Adding these seems reasonable, but I'm a bit worried about adding too many values to satisfy everyone. Should the path be to the executable entry point, or to the Python module? Should the Python version be the verbose string, or the basic version? If basic like mkdocs, should it only be X.Y? Note that you can already add exactly the information you need by customizing |
Hi. Thanks for reviewing, and please give me information about what should we do. |
After 7 days again, What can I do? :) |
Feel free to open a PR, it's easier to discuss that way! Just be aware it may not make it into Click. |
For the record, I addressed this issue in Click Extra 4.7.0. Now you can: from click_extra import command, extra_version_option
@command
@extra_version_option(
message="{prog_name} {version}, from {module_file} (Python {env_info[python][version]})"
)
def custom_env_info():
pass And get the custom version string you are looking for:
More info at: https://kdeldycke.github.io/click-extra/version.html |
I'll follow-up this issue with a PR, as @jcrotts suggested. Sorry for my irresponsibility on this issue. |
A lot of programs are using the path of package and/or the Python version in the text message formatting of the version option.
For example virtualenv:
mkdocs:
pylint:
I think it will be good, to add python version and path values in message formatting.
I tried it, and before pull request, I should to create an issue as Feature request.
Thanks for any reviews, Salar.
The text was updated successfully, but these errors were encountered: