Skip to content

Commit

Permalink
BLD: revert windows repair changes [wheel build]
Browse files Browse the repository at this point in the history
  • Loading branch information
andyfaff committed Jun 21, 2024
1 parent a7fb234 commit 2a9e683
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion tools/wheels/cibw_before_build_win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,28 @@ cat $PROJECT_DIR/tools/wheels/LICENSE_win32.txt >> $PROJECT_DIR/LICENSE.txt
python -m pip install -r requirements/openblas.txt
python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())" > $PROJECT_DIR/scipy-openblas.pc

# create a temporary directory in the destination folder and unpack the wheel
# into there
pushd $DEST_DIR
mkdir -p tmp
pushd tmp
wheel unpack $WHEEL
pushd scipy*

# To avoid DLL hell, the file name of libopenblas that's being vendored with
# the wheel has to be name-mangled. delvewheel is unable to name-mangle PYD
# containing extra data at the end of the binary, which frequently occurs when
# building with mingw.
# We therefore find each PYD in the directory structure and strip them.

for f in $(find ./scipy* -name '*.pyd'); do strip $f; done

# now repack the wheel and overwrite the original
wheel pack .
mv -fv *.whl $WHEEL

cd $DEST_DIR
rm -rf tmp

# delvewheel is the equivalent of delocate/auditwheel for windows.
python -m pip install delvewheel
python -m pip install delvewheel wheel

0 comments on commit 2a9e683

Please sign in to comment.