Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
4 changes: 3 additions & 1 deletion boa/cli/boa.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import sys
import argparse

from conda.base.context import context

from boa.core import monkey_patch_emscripten

if any("emscripten" in arg for arg in sys.argv):
Expand All @@ -14,7 +16,7 @@
from boa._version import __version__
from boa.core.utils import init_api_context

from conda_build.conda_interface import cc_conda_build
cc_conda_build = context.conda_build if hasattr(context, "conda_build") else {}

banner = r"""
_
Expand Down
8 changes: 6 additions & 2 deletions boa/core/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import conda_package_handling.api

# used to get version
from conda_build.conda_interface import env_path_backup_var_exists, TemporaryDirectory
from conda.gateways.disk.create import TemporaryDirectory
from conda_build.utils import tmp_chdir

from conda_build import source, utils
Expand All @@ -44,7 +44,11 @@
if sys.platform == "win32":
import boa.core.windows as windows

from boa.core.utils import shell_path, get_sys_vars_stubs
from boa.core.utils import (
env_path_backup_var_exists,
get_sys_vars_stubs,
shell_path,
)
from boa.core.recipe_handling import copy_recipe
from boa.core.config import boa_config
from boa.tui.exceptions import BoaRunBuildException
Expand Down
3 changes: 2 additions & 1 deletion boa/core/monkey_patch_emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ def patch():
# CONDA-BUILD MONKEY-PATCH
###############################################

from conda.base.context import non_x86_machines as non_x86_linux_machines

from conda_build import utils, variants, environ
from conda_build.conda_interface import non_x86_linux_machines
from conda_build import metadata
from conda_build.features import feature_list

Expand Down
8 changes: 6 additions & 2 deletions boa/core/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@
from conda.common.url import remove_auth, split_anaconda_token
from conda.core.index import _supplement_index_with_system
from conda.base.context import context
from conda_build.conda_interface import pkgs_dirs
from conda.core.package_cache_data import PackageCacheData

import libmambapy

from boa.core.utils import get_index, load_channels, to_package_record_from_subjson
from boa.core.utils import (
get_index,
load_channels,
pkgs_dirs,
to_package_record_from_subjson,
)
from boa.core.config import boa_config

console = boa_config.console
Expand Down
10 changes: 3 additions & 7 deletions boa/core/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from libmambapy import PrefixData
from libmambapy import Context as MambaContext

from conda.common.url import path_to_url
from conda.gateways.disk.create import mkdir_p

from conda_build.utils import CONDA_PACKAGE_EXTENSIONS, get_site_packages
Expand All @@ -25,11 +26,6 @@
get_all_replacements,
log_stats,
)
from conda_build.conda_interface import (
url_path,
env_path_backup_var_exists,
pkgs_dirs,
)
from conda_build.create_test import create_all_test_files
from conda_build.post import post_build
from conda_build.render import bldpkg_path, try_download
Expand All @@ -40,7 +36,7 @@
from conda_build import utils
from conda_build.environ import clean_pkg_cache

from boa.core.utils import shell_path
from boa.core.utils import env_path_backup_var_exists, pkgs_dirs, shell_path
from boa.core.recipe_output import Output
from boa.core.metadata import MetaData
from boa.core import environ
Expand Down Expand Up @@ -359,7 +355,7 @@ def _construct_metadata_for_test_from_package(package, config):

metadata.config.used_vars = list(hash_input.keys())
urls = list(utils.ensure_list(metadata.config.channel_urls))
local_path = url_path(local_channel)
local_path = path_to_url(local_channel)
# replace local with the appropriate real channel. Order is maintained.
urls = [url if url != "local" else local_path for url in urls]
if local_path not in urls:
Expand Down
3 changes: 3 additions & 0 deletions boa/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@

console = boa_config.console

env_path_backup_var_exists = os.environ.get("CONDA_PATH_BACKUP", None)
pkgs_dirs = list(context.pkgs_dirs)

if "bsd" in sys.platform:
shell_path = "/bin/sh"
elif utils.on_win:
Expand Down

0 comments on commit 113e4d2

Please sign in to comment.