Unverified Commit 462584f3 authored by Waylan Limberg's avatar Waylan Limberg Committed by GitHub
Browse files

Provide more version info. (#1393)

This should help when providing support to users with multiple Pythons
installed on their system. The `--version` flag's output mimics pip.
Specifically, the location `mkdocs` is installed at and the Python
version it is installed under.

Typical output might look like:

    mkdocs, version 0.17.2 from /usr/local/lib/python2.7/site-packages/mkdocs (Python 2.7)
parent 4b8687ee
......@@ -2,6 +2,8 @@
# coding: utf-8
from __future__ import unicode_literals
import os
import sys
import logging
import click
import socket
......@@ -88,9 +90,13 @@ remote_name_help = ("The remote name to commit to for Github Pages. This "
"overrides the value specified in config")
force_help = "Force the push to the repository."
pgk_dir = os.path.dirname(os.path.abspath(__file__))
@click.group(context_settings={'help_option_names': ['-h', '--help']})
@click.version_option(__version__, '-V', '--version')
'{0} from {1} (Python {2})'.format(__version__, pgk_dir, sys.version[:3]),
'-V', '--version')
def cli():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment