From 1f010c595e251457e8adf61a953de5b4dc11df7d Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 31 Oct 2024 14:30:08 -0500 Subject: [PATCH] restructure --- install.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/install.sh b/install.sh index 52dd464..a19406e 100755 --- a/install.sh +++ b/install.sh @@ -180,6 +180,18 @@ if [[ -n $opt_py_ver ]]; then sed -i.bak "s,- python=3[0-9\.]*,- python=$opt_py_ver," "$conda_env_file" fi +# Due to https://github.com/conda/conda/issues/8089, we have to install these +# packages manually on specific operating systems: +# Required to use pocl on macOS Big Sur+: +# https://github.com/illinois-ceesd/emirge/issues/114 +# https://github.com/conda-forge/pocl-feedstock/pull/96 +if [[ $(uname) == "Darwin" ]]; then + echo "=== adding clang_osx and ld64 to conda environment file" + echo "- ld64=609" >> "$conda_env_file" + [[ $(uname -m) == "x86_64" ]] && echo "- clang_osx-64" >> "$conda_env_file" + [[ $(uname -m) == "arm64" ]] && echo "- clang_osx-arm64" >> "$conda_env_file" +fi + cat "$conda_env_file" mamba env create --name "$env_name" --yes --file="$conda_env_file" @@ -203,18 +215,11 @@ if [[ -n "$conda_pkg_file" ]]; then done fi -echo "==== Creating pin file for conda packages" +# shellcheck disable=SC2153 +echo "==== Creating pin file for conda packages: $CONDA_PREFIX/conda-meta/pinned" echo 'pocl=5.0=*_6' > "$CONDA_PREFIX"/conda-meta/pinned -# Due to https://github.com/conda/conda/issues/8089, we have to install these -# packages manually on specific operating systems: - -# Required to use pocl on macOS Big Sur+: -# https://github.com/illinois-ceesd/emirge/issues/114 -# https://github.com/conda-forge/pocl-feedstock/pull/96 if [[ $(uname) == "Darwin" ]]; then - [[ $(uname -m) == "x86_64" ]] && conda install --yes clang_osx-64 ld64=609 - [[ $(uname -m) == "arm64" ]] && conda install --yes clang_osx-arm64 ld64=609 echo 'ld64=609' >> "$CONDA_PREFIX"/conda-meta/pinned fi