diff --git a/boa/cli/boa.py b/boa/cli/boa.py index 52a3c648..06042871 100644 --- a/boa/cli/boa.py +++ b/boa/cli/boa.py @@ -3,10 +3,11 @@ import sys import argparse - +from boa.core.monkeypatch import * from boa.core.config import init_global_config from boa._version import __version__ from mamba.utils import init_api_context +import libmambapy as api from conda_build.conda_interface import cc_conda_build @@ -182,6 +183,8 @@ def main(config=None): command = args.command init_api_context() + api_ctx = api.Context() + api_ctx.add_pip_as_python_dependency = False init_global_config(args) from boa.core.run_build import run_build diff --git a/boa/core/build.py b/boa/core/build.py index 5c7ac7f4..9b276535 100644 --- a/boa/core/build.py +++ b/boa/core/build.py @@ -4,11 +4,15 @@ """ Module that does most of the heavy lifting for the ``conda build`` command. """ -from __future__ import absolute_import, division, print_function + +from __future__ import absolute_import, division, print_function +from .monkeypatch import * +import conda_build import fnmatch import io import os +import glob from os.path import isdir, isfile, join import shutil import sys @@ -237,7 +241,6 @@ def select_files(files, include_files, exclude_files): def bundle_conda(metadata, initial_files, env, files_selector=None): - files = post_process_files(metadata, initial_files) # first filter is so that info_files does not pick up ignored files @@ -279,6 +282,7 @@ def bundle_conda(metadata, initial_files, env, files_selector=None): files = select_files(files, include_files, files_selector.get("exclude")) basename = metadata.dist() + tmp_archives = [] final_outputs = [] cph_kwargs = {} @@ -388,6 +392,10 @@ def write_build_scripts(m, script, build_file): env["CONDA_BUILD_STATE"] = "BUILD" + emsdk_dir = os.environ.get("CONDA_EMSDK_DIR") + if emsdk_dir is not None: + env["CONDA_EMSDK_DIR"] = emsdk_dir + # forcing shiny colors everywhere env["CLICOLOR_FORCE"] = 1 env["AM_COLOR_TESTS"] = "always" @@ -628,7 +636,6 @@ def build( if m.skip(): # console.print(utils.get_skip_message(m)) return {} - with utils.path_prepended(m.config.build_prefix): env = environ.get_dict(m=m) diff --git a/boa/core/config.py b/boa/core/config.py index 72e26562..85bae6f4 100644 --- a/boa/core/config.py +++ b/boa/core/config.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * from rich.console import Console boa_config = None diff --git a/boa/core/jinja_support.py b/boa/core/jinja_support.py index 461bb203..57f15bb0 100644 --- a/boa/core/jinja_support.py +++ b/boa/core/jinja_support.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * import os from functools import partial from conda_build.jinja_context import cdt diff --git a/boa/core/metadata.py b/boa/core/metadata.py index ac5fc204..af67bbe2 100644 --- a/boa/core/metadata.py +++ b/boa/core/metadata.py @@ -1,5 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause +from .monkeypatch import * import hashlib import os @@ -219,7 +220,7 @@ def ms_depends(self, typ="run"): # since channel names can be full urls many of these characters are potentially valid for c in "=!@#$%^&*;\"'\\|<>?/": if c in spec.name: - breakpoint() + sys.exit( "Error: bad character '%s' in package name " "dependency '%s'" % (c, spec.name) @@ -238,7 +239,7 @@ def ms_depends(self, typ="run"): parts[1], parts[2], ) - sys.exit(msg) + raise RuntimeError(msg) specs.append(spec) return specs diff --git a/boa/core/monkeypatch.py b/boa/core/monkeypatch.py new file mode 100644 index 00000000..f27a23fb --- /dev/null +++ b/boa/core/monkeypatch.py @@ -0,0 +1,177 @@ +import os +import sys + + +############################################### +# CONDA MONKEY-PATCH +############################################### +from conda.base import constants + +KNOWN_SUBDIRS = PLATFORM_DIRECTORIES = ( + "noarch", + "linux-32", + "linux-64", + "linux-aarch64", + "linux-armv6l", + "linux-armv7l", + "linux-ppc64", + "linux-ppc64le", + "linux-s390x", + "osx-64", + "osx-arm64", + "win-32", + "win-64", + "zos-z", + "emscripten-32", +) +constants.KNOWN_SUBDIRS = KNOWN_SUBDIRS +constants.PLATFORM_DIRECTORIES = PLATFORM_DIRECTORIES + + +############################################### +# CONDA-BUILD MONKEY-PATCH +############################################### + +from conda_build import exceptions, utils, variants, environ +from conda_build.conda_interface import non_x86_linux_machines +from conda_build import metadata +from conda_build import utils, environ +from conda_build.features import feature_list + +try: + from conda_build.conda_interface import string_types +except ImportError: + string_types = str +from conda_build.post import filetypes_for_platform + + +filetypes_for_platform["emscripten"] = ["wasm"] + + +def ns_cfg(config): + # Remember to update the docs of any of this changes + plat = config.host_subdir + d = dict( + linux=plat.startswith("linux-"), + linux32=bool(plat == "linux-32"), + linux64=bool(plat == "linux-64"), + arm=plat.startswith("linux-arm"), + osx=plat.startswith("osx-"), + emscripten=plat.startswith("emscripten-"), + emscripten32=bool(plat == "emscripten-32"), + emscripten64=bool(plat == "emscripten-64"), + unix=plat.startswith(("linux-", "osx-", "emscripten-")), + win=plat.startswith("win-"), + win32=bool(plat == "win-32"), + win64=bool(plat == "win-64"), + x86=plat.endswith(("-32", "-64")), + x86_64=plat.endswith("-64"), + os=os, + environ=os.environ, + nomkl=bool(int(os.environ.get("FEATURE_NOMKL", False))), + ) + + defaults = variants.get_default_variant(config) + py = config.variant.get("python", defaults["python"]) + # there are times when python comes in as a tuple + if not hasattr(py, "split"): + py = py[0] + # go from "3.6 *_cython" -> "36" + # or from "3.6.9" -> "36" + py = int("".join(py.split(" ")[0].split(".")[:2])) + + d["build_platform"] = config.build_subdir + + d.update( + dict( + py=py, + py3k=bool(30 <= py < 40), + py2k=bool(20 <= py < 30), + py26=bool(py == 26), + py27=bool(py == 27), + py33=bool(py == 33), + py34=bool(py == 34), + py35=bool(py == 35), + py36=bool(py == 36), + ) + ) + + np = config.variant.get("numpy") + if not np: + np = defaults["numpy"] + if config.verbose: + utils.get_logger(__name__).warn( + "No numpy version specified in conda_build_config.yaml. " + "Falling back to default numpy value of {}".format(defaults["numpy"]) + ) + d["np"] = int("".join(np.split(".")[:2])) + + pl = config.variant.get("perl", defaults["perl"]) + d["pl"] = pl + + lua = config.variant.get("lua", defaults["lua"]) + d["lua"] = lua + d["luajit"] = bool(lua[0] == "2") + + for machine in non_x86_linux_machines: + d[machine] = bool(plat.endswith("-%s" % machine)) + + for feature, value in feature_list: + d[feature] = value + d.update(os.environ) + + # here we try to do some type conversion for more intuitive usage. Otherwise, + # values like 35 are strings by default, making relational operations confusing. + # We also convert "True" and things like that to booleans. + for k, v in config.variant.items(): + if k not in d: + try: + d[k] = int(v) + except (TypeError, ValueError): + if isinstance(v, string_types) and v.lower() in ("false", "true"): + v = v.lower() == "true" + d[k] = v + return d + + +metadata.ns_cfg = ns_cfg + + +DEFAULT_SUBDIRS = { + "linux-64", + "linux-32", + "linux-s390x", + "linux-ppc64", + "linux-ppc64le", + "linux-armv6l", + "linux-armv7l", + "linux-aarch64", + "win-64", + "win-32", + "osx-64", + "osx-arm64", + "zos-z", + "noarch", + "emscripten-32", +} + +utils.DEFAULT_SUBDIRS = DEFAULT_SUBDIRS + + +def get_shlib_ext(host_platform): + # Return the shared library extension. + if host_platform.startswith("win"): + return ".dll" + elif host_platform in ["osx", "darwin"]: + return ".dylib" + elif host_platform.startswith("linux") or host_platform.startswith("emscripten"): + return ".so" + elif host_platform == "noarch": + # noarch packages should not contain shared libraries, use the system + # platform if this is requested + return get_shlib_ext(sys.platform) + else: + raise NotImplementedError(host_platform) + + +environ.get_shlib_ext = get_shlib_ext diff --git a/boa/core/recipe_handling.py b/boa/core/recipe_handling.py index ffd8a051..d1e60213 100644 --- a/boa/core/recipe_handling.py +++ b/boa/core/recipe_handling.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * import os import re import time diff --git a/boa/core/recipe_output.py b/boa/core/recipe_output.py index 01dba486..c576e9d9 100644 --- a/boa/core/recipe_output.py +++ b/boa/core/recipe_output.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * from boa.core.solver import get_solver import copy import json diff --git a/boa/core/render.py b/boa/core/render.py index 491a4484..9a935ea9 100644 --- a/boa/core/render.py +++ b/boa/core/render.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * from ruamel.yaml import YAML import jinja2 import os diff --git a/boa/core/run_build.py b/boa/core/run_build.py index d2ba8cc4..549efac8 100644 --- a/boa/core/run_build.py +++ b/boa/core/run_build.py @@ -1,6 +1,7 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause +from .monkeypatch import * import argparse import os import glob @@ -196,7 +197,7 @@ def build_recipe( continue_on_failure: bool = False, rerun_build: bool = False, ): - + print("in build_recipe") ydoc = render(recipe_path, config=config) # We need to assemble the variants for each output variants = {} @@ -224,6 +225,9 @@ def build_recipe( # the final metadata sorted_outputs = to_build_tree(ydoc, variants, config, cbc, selected_features) + # the actual filenames like `pyjs-0.1.0-hc96583f_0` without ending (ie the filename without .tar.bz2) + final_names = [] + # then we need to solve and build from the bottom up # we can't first solve all packages without finalizing everything # @@ -311,7 +315,7 @@ def build_recipe( continue final_name = meta.dist() - + final_names.append(final_name) # TODO this doesn't work for noarch! if skip_existing: final_name = meta.dist() @@ -412,7 +416,7 @@ def build_recipe( raise e else: console.print_exception(show_locals=False) - exit(1) + raise e for o in sorted_outputs: if o in failed_outputs: @@ -421,7 +425,7 @@ def build_recipe( print("\n\n") console.print(o) - return sorted_outputs + return sorted_outputs,final_names def extract_features(feature_string): @@ -497,7 +501,7 @@ def run_build(args: argparse.Namespace) -> None: for recipe in all_recipes: while True: try: - build_recipe( + sorted_outputs,final_names = build_recipe( args.command, recipe["recipe_file"], cbc, @@ -511,9 +515,17 @@ def run_build(args: argparse.Namespace) -> None: rerun_build=rerun_build, ) rerun_build = False + if getattr(args, "post_build_callback", None) is not None: + args.post_build_callback( + recipe=recipe, + target_platform=args.target_platform, + sorted_outputs=sorted_outputs, + final_names=final_names + ) except BoaRunBuildException: rerun_build = True except Exception as e: + print(e) raise e else: break diff --git a/boa/core/solver.py b/boa/core/solver.py index 71afad02..cb2b39e5 100644 --- a/boa/core/solver.py +++ b/boa/core/solver.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * import os import tempfile @@ -46,6 +46,7 @@ def get_solver(subdir, output_folder="local"): os.makedirs(pkg_cache, exist_ok=True) if not solver_cache.get(subdir): + print("GET SOLVER") solver_cache[subdir] = MambaSolver([], subdir, output_folder) return solver_cache[subdir], pkg_cache @@ -158,6 +159,7 @@ def replace_channels(self): start_prio = len(self.channels) + len(self.index) for subdir, channel in self.local_index: + print(f"{subdir=} {channel=}") if not subdir.loaded(): continue diff --git a/boa/core/test.py b/boa/core/test.py index 5105456b..98c9640d 100644 --- a/boa/core/test.py +++ b/boa/core/test.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * import json import logging import os diff --git a/boa/core/utils.py b/boa/core/utils.py index aa169e59..b9871ca7 100644 --- a/boa/core/utils.py +++ b/boa/core/utils.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * import collections import sys import os diff --git a/boa/core/validation.py b/boa/core/validation.py index 823f19e7..727ce26e 100644 --- a/boa/core/validation.py +++ b/boa/core/validation.py @@ -1,6 +1,6 @@ # Copyright (C) 2021, QuantStack # SPDX-License-Identifier: BSD-3-Clause - +from .monkeypatch import * from jsonschema import validate as json_validate import json5 as json from jsonschema.exceptions import ValidationError, SchemaError diff --git a/boa/pyapi.py b/boa/pyapi.py new file mode 100644 index 00000000..05d0592b --- /dev/null +++ b/boa/pyapi.py @@ -0,0 +1,96 @@ +from typing import Optional, List, Callable + + +import sys +from .core.monkeypatch import * +from .core.config import init_global_config +from ._version import __version__ +from mamba.utils import init_api_context +import libmambapy as api + +from conda_build.conda_interface import cc_conda_build + + +from types import SimpleNamespace + +banner = r""" + _ + | |__ ___ __ _ + | '_ \ / _ \ / _` | + | |_) | (_) | (_| | + |_.__/ \___/ \__,_| +""" + + +def py_build( + recipe_dir: str, + target: Optional[str] = None, + features: Optional[str] = None, + offline: bool = False, + target_platform: Optional[str] = None, + json: bool = False, + debug: bool = False, + variant_config_files=None, + interactive: bool = False, + output_folder: Optional[str] = None, + skip_existing: Optional[str] = None, + no_test: bool = False, + continue_on_failure: bool = False, + conda_build_build_id_pat: bool = False, + conda_build_remove_work_dir: bool = True, + conda_build_keep_old_work: bool = False, + conda_build_prefix_length: int = 255, + croot: bool = False, + pkg_format: int = 1, + zstd_compression_level: int = 22, + post_build_callback: Optional[Callable] = None, + add_pip_as_python_dependency: bool = False, +): + + if target is None: + target = "" + + if variant_config_files is None: + variant_config_files = [] + + if output_folder is None: + output_folder = cc_conda_build.get("output_folder") + + if skip_existing is None: + skip_existing = "default" + + args = SimpleNamespace( + recipe_dir=recipe_dir, + target=target, + features=features, + offline=offline, + target_platform=target_platform, + json=json, + debug=debug, + variant_config_files=variant_config_files, + interactive=interactive, + output_folder=output_folder, + skip_existing=skip_existing, + no_test=no_test, + continue_on_failure=continue_on_failure, + conda_build_build_id_pat=conda_build_build_id_pat, + conda_build_remove_work_dir=conda_build_remove_work_dir, + conda_build_keep_old_work=conda_build_keep_old_work, + conda_build_prefix_length=conda_build_prefix_length, + croot=croot, + pkg_format=pkg_format, + zstd_compression_level=zstd_compression_level, + post_build_callback=post_build_callback, + command="build", + ) + + print("args", args) + + init_api_context() + api_ctx = api.Context() + api_ctx.add_pip_as_python_dependency = add_pip_as_python_dependency + init_global_config(args) + + from boa.core.run_build import run_build + + run_build(args) diff --git a/tests/recipes-v2/xtensor/conda_build_config.yaml b/tests/recipes-v2/xtensor/conda_build_config.yaml new file mode 100644 index 00000000..30f03833 --- /dev/null +++ b/tests/recipes-v2/xtensor/conda_build_config.yaml @@ -0,0 +1,774 @@ +# This differs from target_platform in that it determines what subdir the compiler +# will target, not what subdir the compiler package will be itself. +# For example, we need a win-64 vs2008_win-32 package, so that we compile win-32 +# code on win-64 miniconda. +cross_compiler_target_platform: # [win] + - win-64 # [win] +c_compiler: + - gcc # [linux] + - clang # [osx] + - vs2017 # [win] + - emcc # [emscripten] +c_compiler_version: # [unix] + - 11 # [osx] + - 9 # [linux] + - 7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] +cxx_compiler: + - gxx # [linux] + - clangxx # [osx] + - vs2017 # [win] + - emcc # [emscripten] +cxx_compiler_version: # [unix] + - 11 # [osx] + - 9 # [linux] + - 7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] +llvm_openmp: # [osx] + - 11 # [osx] +fortran_compiler: # [unix or win64] + - gfortran # [linux64 or (osx and x86_64)] + - gfortran # [aarch64 or ppc64le or armv7l or s390x] + - flang # [win64] +fortran_compiler_version: # [unix or win64] + - 11 # [osx and arm64] + - 9 # [osx and x86_64] + - 9 # [linux] + - 5 # [win64] + - 7 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] + - 9 # [os.environ.get("CF_CUDA_ENABLED", "False") == "True" and linux64] +m2w64_c_compiler: # [win] + - m2w64-toolchain # [win] +m2w64_cxx_compiler: # [win] + - m2w64-toolchain # [win] +m2w64_fortran_compiler: # [win] + - m2w64-toolchain # [win] +CMAKE_GENERATOR: # [win] + - NMake Makefiles # [win] + +cuda_compiler: # [linux64 or win] + - nvcc # [linux64 or win] +cuda_compiler_version: + - None + - 10.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.0 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.1 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 11.2 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] +cudnn: + - undefined + - 7 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 8 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 8 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - 8 # [(linux64 or win) and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +_libgcc_mutex: + - 0.1 conda_forge +# +# Go Compiler Options +# + +# The basic go-compiler with CGO disabled, +# It generates fat binaries without libc dependencies +# The activation scripts will set your CC,CXX and related flags +# to invalid values. +go_compiler: + - go-nocgo +# The go compiler build with CGO enabled. +# It can generate fat binaries that depend on conda's libc. +# You should use this compiler if the underlying +# program needs to link against other C libraries, in which +# case make sure to add 'c,cpp,fortran_compiler' for unix +# and the m2w64 equivalent for windows. +cgo_compiler: + - go-cgo +# The following are helpful variables to simplify go meta.yaml files. +target_goos: + - linux # [linux] + - darwin # [osx] + - windows # [win] +target_goarch: + - amd64 # [x86_64] +target_goexe: + - # [unix] + - .exe # [win] +target_gobin: + - '${PREFIX}/bin/' # [unix] + - '%PREFIX%\bin\' # [win] + +# Rust Compiler Options +rust_compiler: + - rust + +macos_machine: # [osx] + - x86_64-apple-darwin13.4.0 # [osx and x86_64] + - arm64-apple-darwin20.0.0 # [osx and arm64] +MACOSX_DEPLOYMENT_TARGET: # [osx] + - 11.0 # [osx and arm64] + - 10.9 # [osx and x86_64] +target_platform: # [win] + - win-64 # [win] +VERBOSE_AT: + - V=1 +VERBOSE_CM: + - VERBOSE=1 + +# dual build configuration +channel_sources: + - conda-forge # [not s390x] + - https://conda-web.anaconda.org/conda-forge # [s390x] + +channel_targets: + - conda-forge main + +cdt_name: # [linux] + - cos6 # [linux64 and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos6"] + - cos7 # [linux64 and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos7"] + - cos7 # [linux and aarch64] + - cos7 # [linux and ppc64le] + - cos7 # [linux and armv7l] + - cos7 # [linux and s390x] + + - cos6 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos6"] + - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("DEFAULT_LINUX_VERSION", "cos6") == "cos7"] + - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cos7 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + +docker_image: # [os.environ.get("BUILD_PLATFORM", "").startswith("linux-")] + - quay.io/condaforge/linux-anvil-cos7-x86_64 # [os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-aarch64 # [os.environ.get("BUILD_PLATFORM") == "linux-aarch64"] + - quay.io/condaforge/linux-anvil-ppc64le # [os.environ.get("BUILD_PLATFORM") == "linux-ppc64le"] + - quay.io/condaforge/linux-anvil-armv7l # [os.environ.get("BUILD_PLATFORM") == "linux-armv7l"] + + - quay.io/condaforge/linux-anvil-cos7-cuda:10.2 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.0 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.1 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"] + - quay.io/condaforge/linux-anvil-cuda:11.2 # [linux64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM") == "linux-64"] + +zip_keys: + - # [unix] + - c_compiler_version # [unix] + - cxx_compiler_version # [unix] + - fortran_compiler_version # [unix] + - cudnn # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cuda_compiler_version # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cdt_name # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - docker_image # [linux and os.environ.get("CF_CUDA_ENABLED", "False") == "True" and os.environ.get("BUILD_PLATFORM", "").startswith("linux-")] + - # [win64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cudnn # [win64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - cuda_compiler_version # [win64 and os.environ.get("CF_CUDA_ENABLED", "False") == "True"] + - + - python + - numpy + - python_impl + +# aarch64 specifics because conda-build sets many things to centos 6 +# this can probably be removed when conda-build gets updated defaults +# for aarch64 +cdt_arch: aarch64 # [aarch64] +BUILD: aarch64-conda_cos7-linux-gnu # [aarch64] + +# armv7l specifics because conda-build sets many things to centos 6 +# this can probably be removed when conda-build gets updated defaults +# for aarch64 +cdt_arch: armv7l # [armv7l] +BUILD: armv7-conda_cos7-linux-gnueabihf # [armv7l] + +# TODO: remove these when run_exports are added to the packages. +pin_run_as_build: + arpack: + max_pin: x.x.x + boost: + max_pin: x.x.x + boost-cpp: + max_pin: x.x.x + bzip2: + max_pin: x + cairo: + max_pin: x.x + curl: + max_pin: x + dbus: + max_pin: x + fftw: + max_pin: x + flann: + max_pin: x.x.x + fontconfig: + max_pin: x + freetype: + max_pin: x + gdal: + max_pin: x.x + geotiff: + max_pin: x.x.x + glew: + max_pin: x.x + glpk: + max_pin: x.x + gmp: + max_pin: x + graphviz: + max_pin: x + harfbuzz: + max_pin: x + hdf4: + max_pin: x.x + isl: + max_pin: x.x + jasper: + max_pin: x + jpeg: + max_pin: x + libjpeg_turbo: + max_pin: x + json-c: + max_pin: x.x + jsoncpp: + max_pin: x.x.x + kealib: + max_pin: x.x + krb5: + max_pin: x.x + libblitz: + max_pin: x.x + libcurl: + max_pin: x + libevent: + max_pin: x.x.x + libffi: + max_pin: x.x + libgdal: + max_pin: x.x + libiconv: + max_pin: x.x + libkml: + max_pin: x.x + libpng: + max_pin: x.x + librsvg: + max_pin: x + libsvm: + max_pin: x.x + libtiff: + max_pin: x + libxml2: + max_pin: x.x + libuuid: + max_pin: x + lz4-c: + max_pin: x.x.x + lzo: + max_pin: x + metis: + max_pin: x.x + mpfr: + max_pin: x + netcdf-cxx4: + max_pin: x.x + netcdf-fortran: + max_pin: x.x + nettle: + max_pin: x.x + nlopt: + max_pin: x.x.x + nss: + max_pin: x + nspr: + max_pin: x + occt: + max_pin: x.x + openturns: + max_pin: x.x + openjpeg: + max_pin: x.x + pango: + max_pin: x.x + poppler: + max_pin: x.x + qt: + max_pin: x.x + qtkeychain: + max_pin: x.x + readline: + max_pin: x + r-base: + max_pin: x.x + min_pin: x.x + sox: + max_pin: x.x.x + sqlite: + max_pin: x + tk: + max_pin: x.x + tiledb: + max_pin: x.x + vlfeat: + max_pin: x.x.x + vtk: + max_pin: x.x.x + xz: + max_pin: x.x + zeromq: + max_pin: x.x # [not win] + max_pin: x.x.x # [win] + zlib: + max_pin: x.x + +# Pinning packages + +# blas +libblas: + - 3.8 *netlib # [not (osx and arm64)] + - 3.9 *netlib # [osx and arm64] +libcblas: + - 3.8 *netlib # [not (osx and arm64)] + - 3.9 *netlib # [osx and arm64] +liblapack: + - 3.8 *netlib # [not (osx and arm64)] + - 3.9 *netlib # [osx and arm64] +liblapacke: + - 3.8 *netlib # [not (osx and arm64)] + - 3.9 *netlib # [osx and arm64] +blas_impl: + - openblas + - mkl # [x86 or x86_64] + - blis # [x86 or x86_64] + +abseil_cpp: + - '20210324.2' +alsa_lib: + - 1.2.3 +antic: + - 0.2 +arb: + - '2.21' +arpack: + - 3.7 +arrow_cpp: + - 6.0.1 + - 5.0.0 + - 4.0.1 +assimp: + - 5.2 +aws_c_auth: + - 0.6.10 +aws_c_cal: + - 0.5.12 +aws_c_common: + - 0.6.19 +aws_c_event_stream: + - 0.2.7 +aws_c_http: + - 0.6.10 +aws_c_io: + - 0.10.17 +aws_c_mqtt: + - 0.7.10 +aws_c_s3: + - 0.1.32 +aws_c_sdkutils: + - 0.1.1 +aws_checksums: + - 0.1.12 +aws_crt_cpp: + - 0.17.15 +aws_sdk_cpp: + - 1.9.160 +boost: + - 1.74.0 +boost_cpp: + - 1.74.0 +bzip2: + - 1 +cairo: + - 1.16 +capnproto: + - 0.9.1 +ccr: + - 1.3 +cfitsio: + - 4.0.0 +coin_or_cbc: + - 2.10 +coincbc: + - 2.10 +coin_or_cgl: + - 0.60 +coin_or_clp: + - 1.17 +coin_or_osi: + - 0.108 +coin_or_utils: + - 2.11 +cutensor: + - 1 +curl: + - 7 +davix: + - '0.8' +dbus: + - 1 +exiv2: + - 0.27 +expat: + - 2 +ffmpeg: + - '4.3' +fftw: + - 3 +flann: + - 1.9.1 +fmt: + - '8' +fontconfig: + - 2.13 +freetype: + - 2 +gct: + - 6.2.1629922860 +gf2x: + - '1.3' +gdk_pixbuf: + - 2 +gnuradio_core: + - 3.10.0 +gsl: + - 2.7 +gsoap: + - 2.8.119 +gstreamer: + - 1.18 +gst_plugins_base: + - 1.18 +gdal: + - '3.4' +geos: + - 3.10.2 +geotiff: + - '1.7' +gfal2: + - '2.20' +gflags: + - 2.2 +giflib: + - 5.2 +glew: + - 2.1 +glib: + - '2' +glog: + - '0.5' +glpk: + - 4.65 +gmp: + - 6 +google_cloud_cpp: + - '1.35' +google_cloud_cpp_common: + - 0.25.0 +googleapis_cpp: + - '0.10' +graphviz: + - 2.47 +grpc_cpp: + - '1.43' +harfbuzz: + - '3' +hdf4: + - 4.2 +hdf5: + - 1.10.6 +icu: + - '69' +ipopt: + - 3.14 +isl: + - '0.22' +jasper: + - '2' +jpeg: + - 9 +libjpeg_turbo: + - 2 +json_c: + - 0.15 +jsoncpp: + - 1.9.5 +kealib: + - 1.4 +krb5: + - '1.19' +libarchive: + - 3.5 +libblitz: + - 1.0.2 +libcint: + - '5.1' +libcurl: + - 7 +libcrc32c: + - 1.1 +libdap4: + - 3.20.6 +libeantic: + - 1 +libevent: + - 2.1.10 +libexactreal: + - 2 +libffi: + - '3.3' +libflatsurf: + - 3 +libflint: + - '2.8' +libgdal: + - '3.4' +libgit2: + - '1.3' +libhugetlbfs: + - 2 +libhwy: + - 0.15 +libiconv: + - 1.16 +libintervalxt: + - 3 +libkml: + - 1.3 +libiio: + - 0 +libmatio: + - 1.5.21 +libmicrohttpd: + - 0.9 +libnetcdf: + - 4.8.1 +libopencv: + - 4.5.5 +libpcap: + - '1.10' +libpng: + - 1.6 +libprotobuf: + - '3.18' +librdkafka: + - '1.7' +librsvg: + - 2 +libsecret: + - 0.18 +libspatialindex: + - 1.9.3 +libssh2: + - 1 +libsvm: + - 3.21 +libthrift: + - 0.15.0 +libtiff: + - 4 +libunwind: + - '1.6' +libv8: + - 8.9.83 +libwebp: + - 1 +libwebp_base: + - 1 +libxml2: + - 2.9 +libuuid: + - 2 +libzip: + - 1 +log4cxx: + - 0.11.0 +lz4_c: + - 1.9.3 +lzo: + - 2 +metis: + - 5.1 +mimalloc: + - 1.6.3 +mkl: + - '2021' +mkl_devel: + - '2021' +mpich: + - 3 +mpfr: + - 4 +mumps_mpi: + - 5.2 +mumps_seq: + - 5.2 +nccl: + - 2 +ncurses: + - 6 +netcdf_cxx4: + - 4.3 +netcdf_fortran: + - 4.5 +nettle: + - '3.7' +nodejs: + - '17' + - '16' + - '14' # [not (osx and arm64)] +nss: + - 3 +nspr: + - 4 +nlopt: + - '2.7' +ntl: + - '11.4.3' +# we build for the oldest version possible of numpy for forward compatibility +numpy: + # part of a zip_keys: python, python_impl, numpy + - 1.18 # [not (osx and arm64)] + - 1.18 # [not (osx and arm64)] + - 1.19 # [osx and arm64] + - 1.19 +occt: + - '7.5' +openblas: + - 0.3.* +openexr: + - 2.5 +openjpeg: + - '2.4' +openmpi: + - 4 +openssl: + - 1.1.1 +openturns: + - '1.18' +orc: + - 1.7.2 +pango: + - '1.48' +pari: + - 2.13.* *_pthread +perl: + - 5.32.1 +petsc: + - 3.15 +petsc4py: + - 3.15 +slepc: + - 3.15 +slepc4py: + - 3.15 +pcre: + - '8' +pcre2: + - '10.37' +pixman: + - 0 +poco: + - 1.11.1 +poppler: + - '22.01' +proj: + - 8.2.0 +pybind11_abi: + - 4 +python: + # part of a zip_keys: python, python_impl, numpy + - 3.7.* *_cpython # [not (osx and arm64)] + - 3.8.* *_cpython + - 3.9.* *_cpython +python_impl: + # part of a zip_keys: python, python_impl, numpy + - cpython # [not (osx and arm64)] + - cpython + - cpython +qt: + - 5.12 +qtkeychain: + - '0.12' +re2: + - 2021.11.01 +readline: + - "8" +rocksdb: + - "6.10" +root_base: + - 6.24.6 +ruby: + - 2.5 + - 2.6 +r_base: + - 4.0 + - 4.1 +scotch: + - 6.0.9 +ptscotch: + - 6.0.9 +s2n: + - 1.3.6 +singular: + - 4.2.0.p3 +snappy: + - 1 +soapysdr: + - '0.8' +sox: + - 14.4.2 +spdlog: + - 1.9 +sqlite: + - 3 +suitesparse: + - 5 +superlu_dist: + - 7.1.1 +tbb: + - 2020 +tbb_devel: + - 2020 +thrift_cpp: + - 0.15.0 +tinyxml2: + - 9 +tk: + - 8.6 # [not ppc64le] +tiledb: + - '2.6' +uhd: + - 4.1.0 +vc: # [win] + - 14 # [win] +vlfeat: + - 0.9.20 +volk: + - '2.5' +vtk: + - 9.0.1 +x264: + - '1!161.*' +xerces_c: + - 3.2 +xrootd: + - '5' +xz: + - 5.2 +zeromq: + - 4.3.4 +zlib: + - 1.2 +zlib_ng: + - 2.0 +zstd: + - '1.5'