-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
set -xe | ||
|
||
WHEEL="$1" | ||
DEST_DIR="$2" | ||
|
||
# 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 fdsasrsf* | ||
|
||
# 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 ./fdasrsf* -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 | ||
|
||
# the libopenblas.dll is placed into this directory in the cibw_before_build | ||
# script. | ||
delvewheel repair --add-path /c/opt/openblas/openblas_dll --no-dll libsf_error_state.dll -w $DEST_DIR $WHEEL |