Ejemplo n.º 1
0
    get_default_urls = lambda: DEFAULT_CHANNELS

    arch_name = conda.base.context.context.arch_name
    binstar_upload = conda.base.context.context.binstar_upload
    bits = conda.base.context.context.bits
    default_prefix = conda.base.context.context.default_prefix
    default_python = conda.base.context.context.default_python
    envs_dirs = conda.base.context.context.envs_dirs
    pkgs_dirs = conda.base.context.context.pkgs_dirs
    platform = conda.base.context.context.platform
    root_dir = conda.base.context.context.root_dir
    root_writable = conda.base.context.context.root_writable
    subdir = conda.base.context.context.subdir
    from conda.models.channel import get_conda_build_local_url
    get_rc_urls = lambda: list(conda.base.context.context.channels)
    get_local_urls = lambda: list(get_conda_build_local_url()) or []
    load_condarc = lambda fn: conda.base.context.reset_context([fn])
    PaddingError = conda.exceptions.PaddingError
    LinkError = conda.exceptions.LinkError

else:
    from conda.config import get_default_urls, non_x86_linux_machines, load_condarc  # NOQA
    from conda.cli.common import get_prefix  # NOQA

    arch_name = cc.arch_name
    binstar_upload = cc.binstar_upload
    bits = cc.bits
    default_prefix = cc.default_prefix
    default_python = cc.default_python
    envs_dirs = cc.envs_dirs
    pkgs_dirs = cc.pkgs_dirs
Ejemplo n.º 2
0
def get_local_urls():
    from conda.models.channel import get_conda_build_local_url
    return get_conda_build_local_url() or []
Ejemplo n.º 3
0
    pkgs_dirs = list(context.pkgs_dirs)
    cc_platform = context.platform
    root_dir = context.root_dir
    root_writable = context.root_writable
    subdir = context.subdir

    get_rc_urls = lambda: list(context.channels)
    get_prefix = partial(context_get_prefix, context)
    cc_conda_build = context.conda_build if hasattr(context,
                                                    'conda_build') else {}

    # disallow softlinks.  This avoids a lot of dumb issues, at the potential cost of disk space.
    os.environ[str('CONDA_ALLOW_SOFTLINKS')] = str('false')
    reset_context()

    get_local_urls = lambda: list(get_conda_build_local_url()) or []
    arch_name = context.arch_name

if parse_version(CONDA_VERSION) >= parse_version("4.2"):
    from conda.exceptions import (CondaError, CondaHTTPError, LinkError,
                                  LockError, NoPackagesFoundError,
                                  PaddingError, UnsatisfiableError)

    from conda.base.context import non_x86_linux_machines
    from conda.base.context import context, get_prefix as context_get_prefix, reset_context
    binstar_upload = context.binstar_upload
    bits = context.bits
    conda_private = context.conda_private
    default_python = context.default_python
    envs_dirs = context.envs_dirs
    pkgs_dirs = list(context.pkgs_dirs)
Ejemplo n.º 4
0
def get_local_urls():
    from conda.models.channel import get_conda_build_local_url
    return get_conda_build_local_url() or []