""" Bootstrap the Galaxy framework. This should not be called directly! Use the run.sh script in Galaxy's top level directly. """ from __future__ import absolute_import import os import sys sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'lib'))) from galaxy.util.pastescript import serve from check_python import check_python # noqa: I100, I201 # ensure supported version try: check_python() except Exception: sys.exit(1) if 'LOG_TEMPFILES' in os.environ: from log_tempfile import TempFile _log_tempfile = TempFile() serve.run()
""" import logging logging.basicConfig() log = logging.getLogger(__name__) import cPickle import json import os import sys # ensure supported version from check_python import check_python try: check_python() except: sys.exit(1) new_path = [os.path.join(os.getcwd(), "lib")] new_path.extend(sys.path[1:]) # remove scripts/ from the path sys.path = new_path from galaxy import eggs import pkg_resources import galaxy.model.mapping # need to load this before we unpickle, in order to setup properties assigned by the mappers galaxy.model.Job( ) # this looks REAL stupid, but it is REQUIRED in order for SA to insert parameters into the classes defined by the mappers --> it appears that instantiating ANY mapper'ed class would suffice here from galaxy.util import stringify_dictionary_keys from sqlalchemy.orm import clear_mappers from galaxy.objectstore import build_object_store_from_config