Skip to content

BLD: bump OpenBLAS version, use OpenBLAS for win-arm64 #29039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
May 29, 2025
Prev Previous commit
Next Next commit
allow noblas in win32 wheels, use scipy-openblas32 on win-arm64 [whee…
…l build]
  • Loading branch information
mattip committed May 27, 2025
commit eb7a3d71f47397d0d158ae19cfc8429406d1b2fb
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ environment = {PKG_CONFIG_PATH="./.openblas"}
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=false build-dir=build"
repair-wheel-command = "bash -el ./tools/wheels/repair_windows.sh {wheel} {dest_dir}"

[[tool.cibuildwheel.overrides]]
select = "*-win32"
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
repair-wheel-command = ""

[[tool.cibuildwheel.overrides]]
select = "*-win_arm64"
config-settings = "setup-args=--vsenv setup-args=-Dallow-noblas=true build-dir=build"
Expand Down
18 changes: 13 additions & 5 deletions tools/wheels/cibw_before_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,28 @@ fi

# Install Openblas from scipy-openblas64
if [[ "$INSTALL_OPENBLAS" = "true" ]] ; then
echo PKG_CONFIG_PATH $PKG_CONFIG_PATH
# by default, use scipy-openblas64
OPENBLAS=openblas64
if [[ $RUNNER_ARCH != "X64" ]] ; then
# Possible values in github are X86, X64, ARM, or ARM64
# On macos-arm64 and win32 we do not use OpenBLAS
# On win-arm64 we use # 32-bit interfaces (scipy_openblas32)
OPENBLAS=openblas32
fi
echo PKG_CONFIG_PATH is $PKG_CONFIG_PATH, OPENBLAS is ${OPENBLAS}
PKG_CONFIG_PATH=$PROJECT_DIR/.openblas
rm -rf $PKG_CONFIG_PATH
mkdir -p $PKG_CONFIG_PATH
python -m pip install -r requirements/ci_requirements.txt
python -c "import scipy_openblas64; print(scipy_openblas64.get_pkg_config())" > $PKG_CONFIG_PATH/scipy-openblas.pc
python -c "import scipy_openblas64; print(scipy_${OPENBLAS}.get_pkg_config())" > $PKG_CONFIG_PATH/scipy-openblas.pc
# Copy the shared objects to a path under $PKG_CONFIG_PATH, the build
# will point $LD_LIBRARY_PATH there and then auditwheel/delocate-wheel will
# pull these into the wheel. Use python to avoid windows/posix problems
python <<EOF
import os, scipy_openblas64, shutil
srcdir = os.path.join(os.path.dirname(scipy_openblas64.__file__), "lib")
import os, scipy_${OPENBLAS}, shutil
srcdir = os.path.join(os.path.dirname(scipy_${OPENBLAS}.__file__), "lib")
shutil.copytree(srcdir, os.path.join("$PKG_CONFIG_PATH", "lib"))
srcdir = os.path.join(os.path.dirname(scipy_openblas64.__file__), ".dylibs")
srcdir = os.path.join(os.path.dirname(scipy_${OPENBLAS}.__file__), ".dylibs")
if os.path.exists(srcdir): # macosx delocate
shutil.copytree(srcdir, os.path.join("$PKG_CONFIG_PATH", ".dylibs"))
EOF
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy