display all versions in --version - fixes #7

This commit is contained in:
Tarek Ziade 2012-02-14 13:18:16 +01:00
parent 1fb8c5113b
commit 3fabe017ae
4 changed files with 13 additions and 2 deletions

View file

@ -1 +1,4 @@
# #
__version__ = '1.1'

View file

@ -92,6 +92,8 @@ before the docstring, you can use \n for newline, \t for tab and \s
for space. for space.
""" """
from flake8 import __version__ as flake8_version
from pyflakes import __version__ as pep8_version
__version__ = '0.6.1' __version__ = '0.6.1'
@ -1266,7 +1268,9 @@ def process_options(arglist=None):
Process options passed either via arglist or via command line args. Process options passed either via arglist or via command line args.
""" """
global options, args global options, args
parser = OptionParser(version=__version__, version = '%s (pyflakes: %s, pep8: %s)' % (flake8_version, pep8_version,
__version__)
parser = OptionParser(version=version,
usage="%prog [options] input ...") usage="%prog [options] input ...")
parser.add_option('--max-complexity', default=-1, action='store', parser.add_option('--max-complexity', default=-1, action='store',
type='int', help="McCabe complexity treshold") type='int', help="McCabe complexity treshold")

View file

@ -10,6 +10,8 @@ import sys
from flake8 import messages from flake8 import messages
from flake8.util import skip_warning from flake8.util import skip_warning
__version__ = '0.5.0'
# utility function to iterate over an AST node's children, adapted # utility function to iterate over an AST node's children, adapted
# from Python 2.6's standard ast module # from Python 2.6's standard ast module
try: try:

View file

@ -3,12 +3,14 @@ try:
except ImportError: except ImportError:
from distutils.core import setup from distutils.core import setup
from flake8 import __version__
README = open('README').read() README = open('README').read()
setup( setup(
name="flake8", name="flake8",
license="MIT", license="MIT",
version="1.1", version=__version__,
description="code checking using pep8 and pyflakes", description="code checking using pep8 and pyflakes",
author="Tarek Ziade", author="Tarek Ziade",
author_email="tarek@ziade.org", author_email="tarek@ziade.org",