From 7268f8936cc5f0b6424e2aa2ac27ed44661fba4a Mon Sep 17 00:00:00 2001 From: Theodore Kisner Date: Thu, 17 Oct 2024 07:34:53 -0700 Subject: [PATCH] Test building our open openblas on macos --- packaging/deps/openblas.sh | 7 +++- packaging/wheels/install_deps_osx.sh | 48 ++++++++++++++++------------ 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/packaging/deps/openblas.sh b/packaging/deps/openblas.sh index 1ca3ceb34..9edd68ce8 100644 --- a/packaging/deps/openblas.sh +++ b/packaging/deps/openblas.sh @@ -30,11 +30,16 @@ if [ "${STATIC}" = "yes" ]; then targ="libs netlib" fi +omp="USE_OPENMP=1" +if [ "x${OMPFLAGS}" = "x" ]; then + omp="USE_OPENMP=0" +fi + start_dir=$(pwd) rm -rf ${openblas_dir} tar xzf ${openblas_pkg} \ && pushd ${openblas_dir} >/dev/null 2>&1 \ - && make USE_OPENMP=1 ${shr} \ + && make ${omp} ${shr} \ MAKE_NB_JOBS=${MAKEJ} \ CC="${CC}" FC="${FC}" DYNAMIC_ARCH=1 TARGET=GENERIC \ COMMON_OPT="${CFLAGS}" FCOMMON_OPT="${FCFLAGS}" \ diff --git a/packaging/wheels/install_deps_osx.sh b/packaging/wheels/install_deps_osx.sh index 034367949..829e651ba 100755 --- a/packaging/wheels/install_deps_osx.sh +++ b/packaging/wheels/install_deps_osx.sh @@ -95,26 +95,27 @@ pyver=$(python3 --version 2>&1 | awk '{print $2}' | sed -e "s#\(.*\)\.\(.*\)\..* numpy_ver="2.0.1" # Install build requirements. -CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/build_requirements.txt" "numpy==${numpy_ver}" "scipy_openblas32" +# CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/build_requirements.txt" "numpy==${numpy_ver}" "scipy_openblas32" +CC="${CC}" CFLAGS="${CFLAGS}" pip install -v -r "${scriptdir}/build_requirements.txt" "numpy==${numpy_ver}" -# We use the scipy openblas wheel to get the openblas to use. +# # We use the scipy openblas wheel to get the openblas to use. -# First ensure that pkg-config is set to search somewhere -if [ -z "${PKG_CONFIG_PATH}" ]; then - export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" -fi +# # First ensure that pkg-config is set to search somewhere +# if [ -z "${PKG_CONFIG_PATH}" ]; then +# export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" +# fi -python3 -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" > ${PKG_CONFIG_PATH}/scipy-openblas.pc +# python3 -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" > ${PKG_CONFIG_PATH}/scipy-openblas.pc -# To help delocate find the libraries, we copy them into /usr/local -python3 <