From 49b5cb126d3d85fd96041ed0d4709917f6bfadc0 Mon Sep 17 00:00:00 2001 From: peekxc Date: Thu, 7 Dec 2023 13:16:23 -0500 Subject: [PATCH] windows repair changes --- .github/workflows/build_windows.yml | 2 +- tools/repair_windows.sh | 25 ++++++++++++------------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index cf051eb..0e6f6ee 100644 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -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 diff --git a/tools/repair_windows.sh b/tools/repair_windows.sh index 2a28474..ed71cbb 100644 --- a/tools/repair_windows.sh +++ b/tools/repair_windows.sh @@ -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