Ejemplo n.º 1
0
from .watch import watch

try:
    _home = os.environ["CONDA_PREFIX"]
except KeyError:
    try:
        _home = os.environ["VIRTUAL_ENV"]
    except KeyError:
        _home = os.path.expanduser("~")

DEFAULT_GUILD_HOME = os.path.join(_home, ".guild")


@click.group(cls=click_util.Group)
@click.version_option(
    version=guild_version(), prog_name="guild", message="%(prog)s %(version)s"
)
@click.option(
    "-C",
    "cwd",
    metavar="PATH",
    help=("Use PATH as current directory for referencing guild " "files (guild.yml)."),
    default=".",
)
@click.option(
    "-H",
    "guild_home",
    metavar="PATH",
    help="Use PATH as Guild home (default is {}).".format(DEFAULT_GUILD_HOME),
    default=DEFAULT_GUILD_HOME,
    envvar="GUILD_HOME",
Ejemplo n.º 2
0
from .view import view
from .watch import watch

try:
    _home = os.environ["CONDA_PREFIX"]
except KeyError:
    try:
        _home = os.environ["VIRTUAL_ENV"]
    except KeyError:
        _home = os.path.expanduser("~")

DEFAULT_GUILD_HOME = os.path.join(_home, ".guild")


@click.group(cls=click_util.Group)
@click.version_option(version=guild_version(),
                      prog_name="guild",
                      message="%(prog)s %(version)s")
@click.option("-C",
              "cwd",
              metavar="PATH",
              help=("Use PATH as current directory for referencing guild "
                    "files (guild.yml)."),
              default=".")
@click.option(
    "-H",
    "guild_home",
    metavar="PATH",
    help="Use PATH as Guild home (default is {}).".format(DEFAULT_GUILD_HOME),
    default=DEFAULT_GUILD_HOME,
    envvar="GUILD_HOME")
Ejemplo n.º 3
0
from .view import view
from .watch import watch

try:
    _home = os.environ["CONDA_PREFIX"]
except KeyError:
    try:
        _home = os.environ["VIRTUAL_ENV"]
    except KeyError:
        _home = os.path.expanduser("~")

DEFAULT_GUILD_HOME = os.path.join(_home, ".guild")

@click.group(cls=click_util.Group)
@click.version_option(
    version=guild_version(),
    prog_name="guild",
    message="%(prog)s %(version)s"
)
@click.option(
    "-C", "cwd", metavar="PATH",
    help=(
        "Use PATH as current directory for referencing guild "
        "files (guild.yml)."),
    default=".")
@click.option(
    "-H", "guild_home", metavar="PATH",
    help="Use PATH as Guild home (default is {}).".format(DEFAULT_GUILD_HOME),
    default=DEFAULT_GUILD_HOME,
    envvar="GUILD_HOME")
@click.option(