Skip to content

Commit

Permalink
restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Oct 31, 2024
1 parent d72c0aa commit 1f010c5
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 1f010c5

Please sign in to comment.