# add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import sys # sys.path.insert(0, os.path.abspath('.')) from __future__ import unicode_literals import os import sys import datetime from django import setup sys.path.insert(0, os.path.abspath('../')) import vstutils import django from vstutils.environment import prepare_environment prepare_environment() setup() # -- Project information ----------------------------------------------------- project = 'VST Utils' copyright = '2018-{}, VST Consulting'.format(datetime.datetime.now().year) author = 'VST Consulting' # The short X.Y version version = vstutils.__version__ # The full version, including alpha/beta/rc tags release = version # -- General configuration ---------------------------------------------------
''' import os import warnings try: from vstutils.environment import prepare_environment, cmd_execution except ImportError: warnings.warn('"vstutils" was not installed', ImportWarning) prepare_environment = lambda *args, **kwargs: () cmd_execution = prepare_environment default_settings = { # ansible specific environment variables "ANSIBLE_HOST_KEY_CHECKING": 'False', "ANSIBLE_FORCE_COLOR": "true", # celery specific "C_FORCE_ROOT": "true", # django settings module "DJANGO_SETTINGS_MODULE": os.getenv( "DJANGO_SETTINGS_MODULE", 'polemarch.main.settings' ), # VSTUTILS settings "VST_PROJECT": os.getenv("VST_PROJECT", 'polemarch'), "VST_ROOT_URLCONF": os.getenv("VST_ROOT_URLCONF", 'vstutils.urls'), } __version__ = "1.7.6" prepare_environment(**default_settings)
from vstutils.environment import prepare_environment, cmd_execution __version__ = '1.0.0' settings = { "VST_PROJECT": 'test_proj', "VST_ROOT_URLCONF": 'vstutils.urls', "VST_WSGI": 'vstutils.wsgi', "VST_PROJECT_GUI_NAME": "Example Project", "DJANGO_SETTINGS_MODULE": 'test_proj.settings', } prepare_environment(**settings)