From 70d091fe117d65bc6ea53508963bfccd73e537e8 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Fri, 18 Mar 2016 13:15:03 +0100 Subject: [PATCH] Case when django is not installed --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 12ce5c4..70c0b00 100644 --- a/setup.py +++ b/setup.py @@ -20,10 +20,14 @@ except pkg_resources.VersionConflict: pkg_resources.require('Django >= 1.7') django_bootstrap3 = 'django-bootstrap3 >= 5.4,<7.0.0' django = 'Django >= 1.7,<1.8' - except pkg_resources.VersionConflict: + except (pkg_resources.VersionConflict, pkg_resources.DistributionNotFound): # Else we need to install Django, assume version will be >= 1.8 django_bootstrap3 = 'django-bootstrap3 >= 5.4' django = 'Django >= 1.8,<1.10' +# No version of django installed, assume version will be >= 1.8 +except pkg_resources.DistributionNotFound: + django_bootstrap3 = 'django-bootstrap3 >= 5.4' + django = 'Django >= 1.8,<1.10' setup( name='django-cas-server',