Commits

Trevor Caira committed c6b590a

Added --version option.

  • Participants
  • Parent commits a72a40b

Comments (0)

Files changed (3)

 from setuptools import setup
 
-from timebook import __version__
+from timebook import get_version
 
 setup(
     name='timebook',
-    version='.'.join(str(bit) for bit in __version__),
+    version=get_version(),
     url='http://bitbucket.org/trevor/timebook/',
     description='track what you spend time on',
     author='Trevor Caira',

File timebook/__init__.py

 
 __author__ = 'Trevor Caira <trevor@caira.com>'
 __version__ = (1, 0, 2)
+
+def get_version():
+    return '.'.join(str(bit) for bit in __version__)

File timebook/cmdline.py

 from optparse import OptionParser
 import os
 
+from timebook import get_version
 from timebook.db import Database
 from timebook.commands import commands, run_command
 from timebook.config import parse_config
 [ARGS...]
 
 where COMMAND is one of:
-    %s''' % '\n    '.join(cmd_descs))
+    %s''' % '\n    '.join(cmd_descs), version=get_version())
     parser.disable_interspersed_args()
     parser.add_option('-C', '--config', dest='config',
                       default=DEFAULTS['config'], help='Specify an \