Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix update_index in test to index channel, not subdir #3145

Merged
merged 2 commits into from
Sep 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion conda_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,6 @@ def _construct_metadata_for_test_from_package(package, config):
utils.copy_into(package, local_pkg_location)
local_pkg_location = local_dir

# get channel url
local_channel = os.path.dirname(local_pkg_location)

# update indices in the channel
Expand Down
16 changes: 8 additions & 8 deletions conda_build/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,6 @@ def get_build_index(subdir, bldpkgs_dir, output_folder=None, clear_cache=False,

log.debug("Building new index for subdir '{}' with channels {}, condarc channels "
"= {}".format(subdir, channel_urls, not omit_defaults))
capture = contextlib.contextmanager(lambda: (yield))
if debug:
log_context = partial(utils.LoggingContext, logging.DEBUG)
elif verbose:
log_context = partial(utils.LoggingContext, logging.WARN)
else:
log_context = partial(utils.LoggingContext, logging.CRITICAL + 1)
capture = utils.capture

# priority: (local as either croot or output_folder IF NOT EXPLICITLY IN CHANNEL ARGS),
# then channels passed as args (if local in this, it remains in same order),
Expand All @@ -203,6 +195,14 @@ def get_build_index(subdir, bldpkgs_dir, output_folder=None, clear_cache=False,
update_index(output_folder, verbose=verbose)

# silence output from conda about fetching index files
capture = contextlib.contextmanager(lambda: (yield))
if debug:
log_context = partial(utils.LoggingContext, logging.DEBUG)
elif verbose:
log_context = partial(utils.LoggingContext, logging.WARN)
else:
log_context = partial(utils.LoggingContext, logging.CRITICAL + 1)
capture = utils.capture
with log_context():
with capture():
# replace noarch with native subdir - this ends up building an index with both the
Expand Down
1 change: 1 addition & 0 deletions tests/test_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def test_variants_in_output_names():
assert len(outputs) == 4


@pytest.mark.serial
def test_variants_in_versions_with_setup_py_data(testing_workdir):
recipe = os.path.join(recipe_dir, '12_variant_versions')
outputs = api.get_output_file_paths(recipe)
Expand Down