Skip to content
Snippets Groups Projects

Fix base_build() with a proper support for multi-package-building through conda-build

Merged André Anjos requested to merge proper-multi-build into master
Files
2
+ 15
16
@@ -633,21 +633,19 @@ def base_build(
if all(urls):
logger.info(
"Skipping build for %s as packages with matching "
"Skipping build(s) for recipe at '%s' as packages with matching "
"characteristics exist (%s)",
path,
recipe_dir,
", ".join(urls),
)
return
if any(urls):
logger.error(
"One or more packages for %s already exist (%s). "
"Change the package build number to trigger a build.",
path,
", ".join(urls),
raise RuntimeError(
"One or more packages for recipe at '%s' already exist (%s). "
"Change the package build number to trigger a build." % \
(recipe_dir, ", ".join(urls)),
)
return
# if you get to this point, just builds the package(s)
logger.info("Building %s", path)
@@ -817,14 +815,15 @@ if __name__ == "__main__":
paths = get_output_path(metadata, conda_config)
# asserts we're building at the right location
assert path.startswith(os.path.join(args.conda_root, "conda-bld")), (
'Output path for build (%s) does not start with "%s" - this '
"typically means this build is running on a shared builder and "
"the file ~/.conda/environments.txt is polluted with other "
"environment paths. To fix, empty that file and set its mode "
"to read-only for all."
% (path, os.path.join(args.conda_root, "conda-bld"))
)
for path in paths:
assert path.startswith(os.path.join(args.conda_root, "conda-bld")), (
'Output path for build (%s) does not start with "%s" - this '
"typically means this build is running on a shared builder and "
"the file ~/.conda/environments.txt is polluted with other "
"environment paths. To fix, empty that file and set its mode "
"to read-only for all."
% (path, os.path.join(args.conda_root, "conda-bld"))
)
# retrieve the current build number(s) for this build
build_numbers = [
Loading