Commits

catapela committed be0cc7c

Now robust CKINST() for check the installation and django dependences.

Comments (0)

Files changed (2)

dynamicLink/__init__.py

 
 def CKINST():
     """function to find problems of the installation."""
-
     print('I try to find errors for you!')
+    
     djv = django.VERSION[:2]
     greatest_dlv = version.RELEASE_DJANGO[0]
     smalest_dlv = version.RELEASE_DJANGO[0]
 
     # check dynaic link dependences
     if djv < smalest_dlv:
-        print('Django %s is not supported. With the installed version of dynamicLink is Django %s recommended. ' \
+        print('Error! Django %s is not supported. With the installed version of dynamicLink is Django %s recommended. ' \
         'Use "pip install django==%s.X". ' \
         'To display all supported django versions use "dynamicLink.RELEASE_DJANGO".' \
         % (str(django.VERSION), strform(greatest_dlv), strform(greatest_dlv) ))
     elif djv > greatest_dlv:
-        print('This Version of dynamicLink (try: "dynamicLink.VERSION") needs an ' \
+        print('Error! This Version of dynamicLink (try: "dynamicLink.VERSION") needs an ' \
         'older Django release (try: "dynamicLink.RELEASE_DJANGO"). ' \
         'Use "pip install --upgrade django-dynamic-link" or use "pip install django==%s.X". '\
         % strform(greatest_dlv))
-    elif sys.version_info < version.PYTHON:
+    elif sys.version_info[:2] < version.PYTHON_MIN:
         print('Error! Wrong python version. dynamicLink depends on python %s or higher. ' \
         'With this python installation dynamicLink will not work properly!' \
-        % strform(version.PYTHON))
+        % strform(version.PYTHON_MIN))
     else:
         print("No errors. All seems fine!")
 

dynamicLink/version.py

 import django
 import sys
 
-VERSION = (0,5,4,4)
+VERSION = (0,5,5,0)
 RELEASE_DJANGO = ((1,2),(1,3))
-PYTHON = (2,4)
+PYTHON_MIN = (2,4)
 APPLICATION_NAME = "Dynamic Link"
 VERSION_str = str(VERSION).strip('()').replace(',','.').replace(' ','')
 VERSION_INFO = """