From 2b767f3db576a692a55377771c4f51c734c30207 Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Mon, 17 Oct 2022 19:46:54 +0200 Subject: [PATCH] setup.py imports cas_server/__init__.py. Django might not be installed --- cas_server/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cas_server/__init__.py b/cas_server/__init__.py index d2ae852..72c98ae 100644 --- a/cas_server/__init__.py +++ b/cas_server/__init__.py @@ -9,11 +9,14 @@ # # (c) 2015-2016 Valentin Samir """A django CAS server application""" -import django +try: + import django +except ModuleNotFoundError: + django = None #: version of the application -VERSION = '1.3.1' +VERSION = '2.0.0' -if django.VERSION < (3, 2): +if django is None or django.VERSION < (3, 2): #: path the the application configuration class default_app_config = 'cas_server.apps.CasAppConfig'