Skip to content

Commit

Permalink
windows repair changes
Browse files Browse the repository at this point in the history
  • Loading branch information
peekxc committed Dec 7, 2023
1 parent 335c650 commit 49b5cb1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
coverage report -m
- name: Build a wheel
run: |
python -m pip wheel --no-deps -w wheelhouse .
python -m pip wheel --no-deps --only-binary --wheel-dir $GITHUB_WORKSPACE/wheelhouse .
# delvewheel repair -w dist -v wheelhouse/*.whl
# python -m build --wheel
# $env:wheel_name=Get-ChildItem -Path dist/* -Include *.whl
Expand Down
25 changes: 12 additions & 13 deletions tools/repair_windows.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
set -xe

WHEEL="$1"
DEST_DIR="$2"
WHEELDIR=$GITHUB_WORKSPACE/wheelhouse
WHEELNAME=$(find "$WHEELDIR" -type f | grep *primate*.whl)

strip .local/bin/*.dll
# strip .local/bin/*.dll

# Make sure to leave the wheel in the same directory
wheeldir=$(dirname $WHEELNAME)
pushd $wheeldir
# Unpack the wheel and strip any .pyd DLLs inside
wheel unpack $WHEELNAME
rm $WHEELNAME
strip python_flint-*/flint/*.pyd
wheel pack python_flint-*
popd
# wheeldir=$(dirname $WHEELNAME)
# pushd $wheeldir
# # Unpack the wheel and strip any .pyd DLLs inside
# wheel unpack $WHEELNAME
# rm $WHEELNAME
# strip python_flint-*/flint/*.pyd
# wheel pack python_flint-*
# popd

# Make the wheel relocatable. This will fail with an error message about
# --no-mangle if strip has not been applied to all mingw64-created .dll and
# .pyd files that are needed for the wheel.
delvewheel repair $WHEELNAME \
-w $WHEELHOUSE \
--add-path .local/bin
--wheel-dir $WHEELHOUSE

# ## Need delvewheel for this
# pip install delvewheel
Expand Down

0 comments on commit 49b5cb1

Please sign in to comment.