From 70ac438b00240bc9074265e9595edf3f56a6b85c Mon Sep 17 00:00:00 2001 From: Christopher Schwan Date: Fri, 28 Jun 2024 15:31:20 +0200 Subject: [PATCH] Install CLI dependencies on macOS --- .github/workflows/release.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f3b56079..dea8c2a5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -119,10 +119,28 @@ jobs: 3.11 3.12 3.10 - - name: Install LHAPDF + - name: Install dependencies run: | brew tap davidchall/hep + # install LHAPDF brew install lhapdf + # install APPLgrid's dependencies; disable ROOT because its static libraries are missing + brew install --only-dependencies --without-hoppet --without-lhapdf --without-root applgrid + # install zlib, which is a dependency of APPLgrid but somehow missing + brew install zlib + # APPLgrid wants to be linked against zlib, and we need to find its static library via pkg-config + export PKG_CONFIG_PATH=$(find $(brew --cellar) -name '*.pc' -exec dirname {} + | sort -u | tr '\n' ':') + # manually compile APPLgrid, because we need the file `appl_igrid.h` and the files it includes, which are possibly generated + export HOMEBREW_TEMP="$(pwd)"/tmp + mkdir -p ${HOMEBREW_TEMP} + brew install --build-from-source --keep-tmp --without-hoppet --without-lhapdf --without-root applgrid + export APPL_IGRID_DIR=$(find ${HOMEBREW_TEMP} -name appl_igrid.h -exec dirname {} +) + # do not link against `gfortran` + sed 's/-lgfortran//g' $(command -v applgrid-config) > applgrid-config.new + mv applgrid-config.new $(command -v applgrid-config) + chmod +x $(command -v applgrid-config) + # install fastNLO + brew install --without-fastjet fastnlo - name: Build wheels uses: PyO3/maturin-action@v1 with: