comparison rhodecode/__init__.py @ 1205:f4807acf643d beta

added __license__ into main of rhodecode, PEP8ify
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 04 Apr 2011 19:43:31 +0200
parents 6832ef664673
children a671db5bdd58
comparison
equal deleted inserted replaced
1204:faf31099a70a 1205:f4807acf643d
29 29
30 VERSION = (1, 2, 0, 'beta') 30 VERSION = (1, 2, 0, 'beta')
31 __version__ = '.'.join((str(each) for each in VERSION[:4])) 31 __version__ = '.'.join((str(each) for each in VERSION[:4]))
32 __dbversion__ = 3 #defines current db version for migrations 32 __dbversion__ = 3 #defines current db version for migrations
33 __platform__ = platform.system() 33 __platform__ = platform.system()
34 __license__ = 'GPLv3'
34 35
35 PLATFORM_WIN = ('Windows',) 36 PLATFORM_WIN = ('Windows')
36 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD',) 37 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD')
37 38
38 try: 39 try:
39 from rhodecode.lib.utils import get_current_revision 40 from rhodecode.lib.utils import get_current_revision
40 _rev = get_current_revision() 41 _rev = get_current_revision()
41 except ImportError: 42 except ImportError:
43 _rev = False 44 _rev = False
44 45
45 if len(VERSION) > 3 and _rev: 46 if len(VERSION) > 3 and _rev:
46 __version__ += ' [rev:%s]' % _rev[0] 47 __version__ += ' [rev:%s]' % _rev[0]
47 48
49
48 def get_version(): 50 def get_version():
49 """Returns shorter version (digit parts only) as string.""" 51 """Returns shorter version (digit parts only) as string."""
50 52
51 return '.'.join((str(each) for each in VERSION[:3])) 53 return '.'.join((str(each) for each in VERSION[:3]))
52 54