|
|
@ -257,12 +257,14 @@ def locate_app(script_info, module_name, app_name, raise_if_not_found=True): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_version(ctx, param, value): |
|
|
|
def get_version(ctx, param, value): |
|
|
|
|
|
|
|
from werkzeug import __version__ as werkzeug_version |
|
|
|
if not value or ctx.resilient_parsing: |
|
|
|
if not value or ctx.resilient_parsing: |
|
|
|
return |
|
|
|
return |
|
|
|
message = 'Flask %(version)s\nPython %(python_version)s' |
|
|
|
message = 'Python %(python_version)s\nFlask %(version)s\nWerkzeug %(werkzeug_version)s' |
|
|
|
click.echo(message % { |
|
|
|
click.echo(message % { |
|
|
|
'version': __version__, |
|
|
|
'version': __version__, |
|
|
|
'python_version': sys.version, |
|
|
|
'python_version': sys.version, |
|
|
|
|
|
|
|
'werkzeug_version': werkzeug_version, |
|
|
|
}, color=ctx.color) |
|
|
|
}, color=ctx.color) |
|
|
|
ctx.exit() |
|
|
|
ctx.exit() |
|
|
|
|
|
|
|
|
|
|
|