Fixed many path-related issues, getting closing to getting the server to boot.
This commit is contained in:
parent
0c9bf08c5a
commit
33a42d06c5
15 changed files with 130 additions and 75 deletions
|
|
@ -3,3 +3,5 @@ try:
|
|||
import __pypy__ as is_pypy
|
||||
except ImportError:
|
||||
is_pypy = False
|
||||
|
||||
from utils import *
|
||||
|
|
|
|||
|
|
@ -40,8 +40,11 @@ from twisted.internet import reactor, protocol
|
|||
from twisted.internet.task import LoopingCall
|
||||
|
||||
# Tack on the root evennia directory to the python path and initialize django settings
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
|
||||
os.environ["DJANGO_SETTINGS_MODULE"] = "game.settings"
|
||||
|
||||
#TODO
|
||||
#sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
|
||||
#os.environ["DJANGO_SETTINGS_MODULE"] = "game.settings"
|
||||
|
||||
#from game import settings
|
||||
#try:
|
||||
# from django.conf import settings as settings2
|
||||
|
|
|
|||
|
|
@ -8,8 +8,9 @@ Call this module directly to plot the log (requires matplotlib and numpy).
|
|||
"""
|
||||
import os, sys
|
||||
import time
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings'
|
||||
#TODO!
|
||||
#sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
|
||||
#os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings'
|
||||
import ev
|
||||
from evennia.utils.idmapper import base as _idmapper
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ query as well as count them for optimization testing.
|
|||
|
||||
"""
|
||||
import sys, os
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
|
||||
os.environ["DJANGO_SETTINGS_MODULE"] = "game.settings"
|
||||
#sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))
|
||||
#os.environ["DJANGO_SETTINGS_MODULE"] = "game.settings"
|
||||
from django.db import connection
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ many traits with a normal goblin.
|
|||
"""
|
||||
|
||||
import os, sys, copy
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings'
|
||||
#TODO
|
||||
#sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
||||
#os.environ['DJANGO_SETTINGS_MODULE'] = 'game.settings'
|
||||
|
||||
from django.conf import settings
|
||||
from random import randint
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ import textwrap
|
|||
import datetime
|
||||
import random
|
||||
import traceback
|
||||
from subprocess import check_output
|
||||
from importlib import import_module
|
||||
from inspect import ismodule
|
||||
from collections import defaultdict
|
||||
|
|
@ -304,6 +305,17 @@ def host_os_is(osname):
|
|||
|
||||
|
||||
def get_evennia_version():
|
||||
"""
|
||||
Get the Evennia version info from the main package.
|
||||
"""
|
||||
version = "Unknown"
|
||||
with open(os.path.join(settings.ROOT_DIR, "VERSION.txt"), 'r') as f:
|
||||
version = f.read().strip()
|
||||
try:
|
||||
version = "%s (rev %s)" % (version, check_output("git rev-parse --short HEAD", shell=True, cwd=settings.ROOT_DIR).strip())
|
||||
except IOError:
|
||||
pass
|
||||
return version
|
||||
"""
|
||||
Check for the evennia version info.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue