Пример #1
0
    def _initialize(self):
        from pypeapp.deployment import Deployment
        from pypeapp.lib.Terminal import Terminal
        try:
            import configparser
        except Exception:
            import ConfigParser as configparser

        cur_dir = os.path.dirname(os.path.abspath(__file__))
        config_file_path = os.path.join(cur_dir, "config.ini")
        if os.path.exists(config_file_path):
            config = configparser.ConfigParser()
            config.read(config_file_path)
            try:
                value = config["DEFAULT"]["dev"]
                if value.lower() == "true":
                    os.environ["PYPE_DEV"] = "1"
            except KeyError:
                pass

        # if not called, console coloring will get mangled in python.
        Terminal()
        pype_setup = os.getenv('PYPE_SETUP_PATH')
        d = Deployment(pype_setup)

        tools, config_path = d.get_environment_data()

        os.environ['PYPE_CONFIG'] = config_path
        os.environ['TOOL_ENV'] = os.path.normpath(
            os.path.join(config_path, 'environments'))
        self._add_modules()
        self._load_default_environments(tools=tools)
        self.print_info()
Пример #2
0
    def _initialize(self):
        from pypeapp.storage import Storage
        from pypeapp.deployment import Deployment
        from pypeapp.lib.Terminal import Terminal

        # if not called, console coloring will get mangled in python.
        Terminal()
        pype_setup = os.getenv('PYPE_ROOT')
        d = Deployment(pype_setup)

        tools, config_path = d.get_environment_data()

        os.environ['PYPE_CONFIG'] = config_path
        os.environ['TOOL_ENV'] = os.path.normpath(
            os.path.join(
                config_path,
                'environments'))
        self._add_modules()
        Storage().update_environment()
        self._load_default_environments(tools=tools)
        self.print_info()
Пример #3
0
# If extensions (or modules to document with autodoc) are in another directory,
# 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 os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
from pypeapp.pypeLauncher import PypeLauncher
from pypeapp.deployment import Deployment

pype_setup = os.getenv('PYPE_SETUP_PATH')
d = Deployment(pype_setup)
launcher = PypeLauncher()

tools, config_path = d.get_environment_data()

os.environ['PYPE_CONFIG'] = config_path
os.environ['TOOL_ENV'] = os.path.normpath(os.path.join(config_path,
                                          'environments'))
launcher._add_modules()
launcher._load_default_environments(tools=tools)

# -- Project information -----------------------------------------------------

project = 'pype'
copyright = '2019, Orbi Tools'
author = 'Orbi Tools'

# The short X.Y version
version = ''