Fix django requirements for current LTS version
This commit is contained in:
parent
4284e5be1e
commit
488707b5b9
2 changed files with 11 additions and 16 deletions
|
|
@ -93,8 +93,8 @@ SRESET = chr(19) # shutdown server in reset mode
|
||||||
# requirements
|
# requirements
|
||||||
PYTHON_MIN = "3.7"
|
PYTHON_MIN = "3.7"
|
||||||
TWISTED_MIN = "18.0.0"
|
TWISTED_MIN = "18.0.0"
|
||||||
DJANGO_MIN = "2.1"
|
DJANGO_MIN = "2.2.5"
|
||||||
DJANGO_REC = "2.2"
|
DJANGO_LT = "3.0"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sys.path[1] = EVENNIA_ROOT
|
sys.path[1] = EVENNIA_ROOT
|
||||||
|
|
@ -374,8 +374,8 @@ ERROR_NOTWISTED = """
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ERROR_DJANGO_MIN = """
|
ERROR_DJANGO_MIN = """
|
||||||
ERROR: Django {dversion} found. Evennia requires version {django_min}
|
ERROR: Django {dversion} found. Evennia requires at least version {django_min} (but
|
||||||
or higher.
|
no higher than {django_lt}).
|
||||||
|
|
||||||
If you are using a virtualenv, use the command `pip install --upgrade -e evennia` where
|
If you are using a virtualenv, use the command `pip install --upgrade -e evennia` where
|
||||||
`evennia` is the folder to where you cloned the Evennia library. If not
|
`evennia` is the folder to where you cloned the Evennia library. If not
|
||||||
|
|
@ -386,14 +386,9 @@ ERROR_DJANGO_MIN = """
|
||||||
any warnings and don't run `makemigrate` even if told to.
|
any warnings and don't run `makemigrate` even if told to.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
NOTE_DJANGO_MIN = """
|
|
||||||
NOTE: Django {dversion} found. This will work, but Django {django_rec} is
|
|
||||||
recommended for production.
|
|
||||||
"""
|
|
||||||
|
|
||||||
NOTE_DJANGO_NEW = """
|
NOTE_DJANGO_NEW = """
|
||||||
NOTE: Django {dversion} found. This is newer than Evennia's
|
NOTE: Django {dversion} found. This is newer than Evennia's
|
||||||
recommended version ({django_rec}). It might work, but may be new
|
recommended version ({django_rec}). It might work, but is new
|
||||||
enough to not be fully tested yet. Report any issues.
|
enough to not be fully tested yet. Report any issues.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -1282,13 +1277,13 @@ def check_main_evennia_dependencies():
|
||||||
dversion = ".".join(str(num) for num in django.VERSION if isinstance(num, int))
|
dversion = ".".join(str(num) for num in django.VERSION if isinstance(num, int))
|
||||||
# only the main version (1.5, not 1.5.4.0)
|
# only the main version (1.5, not 1.5.4.0)
|
||||||
dversion_main = ".".join(dversion.split(".")[:2])
|
dversion_main = ".".join(dversion.split(".")[:2])
|
||||||
|
print("dversion", dversion, DJANGO_MIN, DJANGO_LT)
|
||||||
if LooseVersion(dversion) < LooseVersion(DJANGO_MIN):
|
if LooseVersion(dversion) < LooseVersion(DJANGO_MIN):
|
||||||
print(ERROR_DJANGO_MIN.format(dversion=dversion_main, django_min=DJANGO_MIN))
|
print(ERROR_DJANGO_MIN.format(dversion=dversion_main, django_min=DJANGO_MIN,
|
||||||
|
django_lt=DJANGO_LT))
|
||||||
error = True
|
error = True
|
||||||
elif LooseVersion(DJANGO_MIN) <= LooseVersion(dversion) < LooseVersion(DJANGO_REC):
|
elif LooseVersion(DJANGO_LT) <= LooseVersion(dversion_main):
|
||||||
print(NOTE_DJANGO_MIN.format(dversion=dversion_main, django_rec=DJANGO_REC))
|
print(NOTE_DJANGO_NEW.format(dversion=dversion_main, django_rec=DJANGO_LT))
|
||||||
elif LooseVersion(DJANGO_REC) < LooseVersion(dversion_main):
|
|
||||||
print(NOTE_DJANGO_NEW.format(dversion=dversion_main, django_rec=DJANGO_REC))
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print(ERROR_NODJANGO)
|
print(ERROR_NODJANGO)
|
||||||
error = True
|
error = True
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# Evennia dependencies
|
# Evennia dependencies
|
||||||
|
|
||||||
# general
|
# general
|
||||||
django >= 2.2.5, < 2.3
|
django >= 2.2.5, < 3.0
|
||||||
twisted >= 20.3.0, < 21.0.0
|
twisted >= 20.3.0, < 21.0.0
|
||||||
pytz
|
pytz
|
||||||
django-sekizai
|
django-sekizai
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue