Skip to content

Commit 3cbddda

Browse files
committed
fix dll copying on Windows
1 parent 7409521 commit 3cbddda

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tools/wheels/cibw_before_build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ if [[ "$INSTALL_OPENBLAS" = "true" ]] ; then
4242
mkdir -p $PKG_CONFIG_PATH
4343
python -m pip install -r $PROJECT_DIR/requirements/openblas_requirements.txt
4444
python -c "import scipy_${OPENBLAS}; print(scipy_${OPENBLAS}.get_pkg_config())" > $PKG_CONFIG_PATH/scipy-openblas.pc
45+
46+
# Copy scipy-openblas DLL's to a fixed location so we can point delvewheel
47+
# at it in `repair_windows.sh` (needed only on Windows because of the lack
48+
# of RPATH support).
49+
if [[ $RUNNER_OS == "Windows" ]]; then
50+
python <<EOF
51+
import os, scipy_${OPENBLAS}, shutil
52+
srcdir = os.path.join(os.path.dirname(scipy_${OPENBLAS}.__file__), "lib")
53+
shutil.copytree(srcdir, os.path.join("$PKG_CONFIG_PATH", "lib"))
54+
EOF
55+
fi
4556
fi
4657

4758
# cibuildwheel doesn't install delvewheel by default (it does install

0 commit comments

Comments
 (0)