Changeset 123

Show
Ignore:
Timestamp:
08/02/06 15:32:39 (2 years ago)
Author:
mk
Message:

Added --version command line option.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/cheesecake/__init__.py

    r2 r123  
     1__version__ = '0.1' 
  • branches/mk/cheesecake/cheesecake_index.py

    r121 r123  
    3333from util import time_function 
    3434from codeparser import CodeParser 
     35from cheesecake import __version__ as VERSION 
    3536 
    3637__docformat__ = 'reStructuredText en' 
     
    16521653    parser.add_option("-v", "--verbose", action="store_true", dest="verbose", 
    16531654                      default=False, help="verbose output (default=False)") 
     1655    parser.add_option("-V", "--version", action="store_true", dest="version", 
     1656                      default=False, help="Output cheesecake version and exit") 
    16541657 
    16551658    (options, args) = parser.parse_args() 
     
    16691672    static_only = options.static 
    16701673    lite = options.lite 
     1674    version = options.version 
     1675 
     1676    if version: 
     1677        print "cheesecake version %s" % VERSION 
     1678        sys.exit(0) 
    16711679 
    16721680    if not name and not url and not path: 
  • branches/mk/setup.py

    r122 r123  
    55from setuptools import setup 
    66from pkg_resources import require 
     7from cheesecake import __version__ as VERSION 
    78 
    89# Instruct nose to use doctests. 
     
    1314setup( 
    1415        name = 'Cheesecake', 
    15         version = '0.1'
     16        version = VERSION
    1617 
    1718        # metadata for upload to PyPI