changeset 852:b76da6f22e0f beta

fixed some problems with python setup.py operations due to import problems
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 16 Dec 2010 01:25:43 +0100
parents bcbc51db8e8c
children f67868ef6cd2
files rhodecode/__init__.py setup.py
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/__init__.py	Thu Dec 16 01:08:46 2010 +0100
+++ b/rhodecode/__init__.py	Thu Dec 16 01:25:43 2010 +0100
@@ -31,8 +31,12 @@
 __version__ = '.'.join((str(each) for each in VERSION[:4]))
 __dbversion__ = 2 #defines current db version for migrations
 
-from rhodecode.lib.utils import get_current_revision
-_rev = get_current_revision()
+try:
+    from rhodecode.lib.utils import get_current_revision
+    _rev = get_current_revision()
+except ImportError:
+    #this is needed when doing some setup.py operations
+    _rev = False
 
 if len(VERSION) > 3 and _rev:
     __version__ += ' [rev:%s]' % _rev[0]
--- a/setup.py	Thu Dec 16 01:08:46 2010 +0100
+++ b/setup.py	Thu Dec 16 01:25:43 2010 +0100
@@ -17,12 +17,12 @@
     ]
 
 classifiers = ['Development Status :: 4 - Beta',
-                   'Environment :: Web Environment',
-                   'Framework :: Pylons',
-                   'Intended Audience :: Developers',
-                   'License :: OSI Approved :: BSD License',
-                   'Operating System :: OS Independent',
-                   'Programming Language :: Python', ]
+               'Environment :: Web Environment',
+               'Framework :: Pylons',
+               'Intended Audience :: Developers',
+               'License :: OSI Approved :: BSD License',
+               'Operating System :: OS Independent',
+               'Programming Language :: Python', ]
 
 if sys.version_info < (2, 6):
     requirements.append("simplejson")